Build a counter object and use the counter

Assignment Help Python Programming
Reference no: EM133141594

Question: Uses Python to complete the following assignment:

flower_orders=['W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R/B','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','W/R','R/V/Y','R/V/Y','R/V/Y','R/V/Y','R/V/Y','R/V/Y','R/V/Y','R/V/Y','R/V/Y','R/V/Y','W/R/V','W/R/V','W/R/V','W/R/V','W/R/V','W/R/V','W/R/V','W/R/V','W/R/V','W/R/V','W/N/R/V','W/N/R/V','W/N/R/V','W/N/R/V','W/N/R/V','W/N/R/V','W/N/R/V','W/N/R/V','W/R/B/Y','W/R/B/Y','W/R/B/Y','W/R/B/Y','W/R/B/Y','W/R/B/Y','B/Y','B/Y','B/Y','B/Y','B/Y','R/B/Y','R/B/Y','R/B/Y','R/B/Y','R/B/Y','W/N/R/B/V/Y','W/N/R/B/V/Y','W/N/R/B/V/Y','W/N/R/B/V/Y','W/N/R/B/V/Y','W/G','W/G','W/G','W/G','R/Y','R/Y','R/Y','R/Y','N/R/V/Y','N/R/V/Y','N/R/V/Y','N/R/V/Y','W/R/B/V','W/R/B/V','W/R/B/V','W/R/B/V','W/N/R/V/Y','W/N/R/V/Y','W/N/R/V/Y','W/N/R/V/Y','N/R/Y','N/R/Y','N/R/Y','W/V/O','W/V/O','W/V/O','W/N/R/Y','W/N/R/Y','W/N/R/Y','R/B/V/Y','R/B/V/Y','R/B/V/Y','W/R/V/Y','W/R/V/Y','W/R/V/Y','W/R/B/V/Y','W/R/B/V/Y','W/R/B/V/Y','W/N/R/B/Y','W/N/R/B/Y','W/N/R/B/Y','R/G','R/G','B/V/Y','B/V/Y','N/B/Y','N/B/Y','W/B/Y','W/B/Y','W/N/B','W/N/B','W/N/R','W/N/R','W/N/B/Y','W/N/B/Y','W/B/V/Y','W/B/V/Y','W/N/R/B/V/Y/G/M','W/N/R/B/V/Y/G/M','B/R','N/R','V/Y','V','N/R/V','N/V/Y','R/B/O','W/B/V','W/V/Y','W/N/R/B','W/N/R/O','W/N/R/G','W/N/V/Y','W/N/Y/M','N/R/B/Y','N/B/V/Y','R/V/Y/O','W/B/V/M','W/B/V/O','N/R/B/Y/M','N/R/V/O/M','W/N/R/Y/G','N/R/B/V/Y','W/R/B/V/Y/P','W/N/R/B/Y/G','W/N/R/B/V/O/M','W/N/R/B/V/Y/M','W/N/B/V/Y/G/M','W/N/B/V/V/Y/P']

Question 1. Build a counter object and use the counter and confirm they have the same values.

Question 2. Count how many objects have color W in them.

Question 3. Make histogram of colors
# Hint from JohnP - Itertools has a permutation function that might help with these next two.

Question 4. Rank the pairs of colors in each order regardless of how many colors are in an order.

Question 5. Rank the triplets of colors in each order regardless of how many colors are in an order.

Question 6. Make dictionary color for keys and values are what other colors it is ordered with.

Question 7. Make a graph showing the probability of having an edge between two colors based on how often they co-occur. (a numpy square matrix)

Question 8. Make 10 business questions related to the questions we asked above.

dead_men_tell_tales =
['Four score and seven years ago our fathers brought forth on this',
'continent a new nation, conceived in liberty and dedicated to the',
'proposition that all men are created equal. Now we are engaged in',
'a great civil war, testing whether that nation or any nation so',
'conceived and so dedicated can long endure. We are met on a great',
'battlefield of that war. We have come to dedicate a portion of',
'that field as a final resting-place for those who here gave their',
'lives that that nation might live. It is altogether fitting and',
'proper that we should do this. But in a larger sense, we cannot',
'dedicate, we cannot consecrate, we cannot hallow this ground.',
'The brave men, living and dead who struggled here have consecrated',
'it far above our poor power to add or detract. The world will',
'little note nor long remember what we say here, but it can never',
'forget what they did here. It is for us the living rather to be',
'dedicated here to the unfinished work which they who fought here',
'have thus far so nobly advanced. It is rather for us to be here',
'dedicated to the great task remaining before us--that from these',
'honored dead we take increased devotion to that cause for which',
'they gave the last full measure of devotion--that we here highly',
'resolve that these dead shall not have died in vain, that this',
'nation under God shall have a new birth of freedom, and that',
'government of the people, by the people, for the people shall',
'not perish from the earth.']

1. Join everything

2. Remove spaces

3. Occurrence probabilities for letters

4. Tell me transition probabilities for every letter pairs

5. Make a 26x26 graph of 4. in numpy

6. plot graph of transition probabilities from letter to letter

Attachment:- Build a counter object.rar

Reference no: EM133141594

Questions Cloud

Google being run as flexible and flat technocracy : What are the advantages and disadvantages of the creative side of Google being run as a flexible and flat ‘technocracy'?
Discuss different quality term as presented by author : Discuss the different quality term as presented by the author. Which one of these terms is more practical from your point of view?
Creates opportunities for growth : The COVID-19 crisis forever alters the way businesses are run yet it also creates opportunities for growth that many feel ill-equipped to pursue.
American war for independence : What advantages and disadvantages did the American rebels and British forces have to contend with during the American War for Independence?
Build a counter object and use the counter : Build a counter object and use the counter and confirm they have the same values - Rank the pairs of colors in each order regardless of how many colors
Research approach and methodology : Chapter will evaluate various aspects of the research approach and methodology.
Paper on Thomas Mann - transitions in political thought : Prepare paper on Thomas Mann - transitions in political thought
Enacted taxes and regulations on food products : There have been several areas throughout the country that have enacted taxes and regulations on food products
Find the optimum portfolio from each investment opportunity : Find the optimum portfolio from each investment opportunity set (using the formula provided in the lecture slide/textbook). Which optimuml portfolio generates

Reviews

Write a Review

Python Programming Questions & Answers

  Submit your code and any additional images or other things

These are the basic features that your game should have. You should submit your code and any additional images or other things that you need to run the program.

  Display an appropriate message if the variable owing number

Display an appropriate message if the variable, owing contains a number representing at least 100 dollars owing and a different message if it doesn't.

  Find all such numbers which are divisible by 7

Write a program which will find all such numbers which are divisible by 7 but are not a multiple of 5, between 2000 and 3200 both included.

  Write a python program that reads in academic achievements

Write a Python program that reads in the academic achievements of three international applicants and determines which one is the best candidate.

  A program that inputs a filename from the user and prints

You need a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period.

  Report on one important contemporary supply chain management

Report on one important contemporary supply chain management topic that you think is of contemporary relevance or will have a major impact in the future

  Prompt for a number and display the corresponding calendar

Write a program that converts a number from 1 to 12 to the corresponding month. Prompt for a number and display the corresponding calendar.

  BCIS 5110 Programming Languages for Business Analytics

BCIS 5110 Programming Languages for Business Analytics Assignment Help and Solution, University of North Texas - Assessment Writing Service

  What would happen if the script fails to open password file

You have been hired by a company to provide consultation on security and provide recommendations. Using Microsoft® Word, write a 1-page document explaining.

  Write class that takes in a float initial balance

Write class BankAccount that takes in a float initial balance initial_balance. The class should have two operations - a method for deposit and a method for with

  Write python code to load your dataset into a pandas data

A medium-size Australian company imaginary has given you one year of data about the online purchases that their customers have made.

  Write a python program that generates a small web site

ICT112 Assignment - Generated Web Site for Sports Club. You first task is to choose a sport or club, and get some suitable input data

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd