Given the following string, write a program that counts how many times each letter or number has
Fantastic news! We've Found the answer you've been seeking!
Question:
Given the following string, write a program that counts how many times each letter or number has been used in the string.
Transcribed Image Text:
Enter a phrase: "The lazy dog jumped over the curious cat" Here's a sample running of your program: Report in ascending order by ASCII value: Enter a phrase: "The lazy dog jumped over the curious cat" T 1 a 2 c 2 d 2 e 4 g 1 h 2 i 1 j 1 l 1 m 1 0 3 p 1 r 2 s 1 t 2 u 3 v 1 y 1 z 1 Note this example only includes letters. Numbers would be placed, from 0-9, before the letters. Enter a phrase: "The lazy dog jumped over the curious cat" Here's a sample running of your program: Report in ascending order by ASCII value: Enter a phrase: "The lazy dog jumped over the curious cat" T 1 a 2 c 2 d 2 e 4 g 1 h 2 i 1 j 1 l 1 m 1 0 3 p 1 r 2 s 1 t 2 u 3 v 1 y 1 z 1 Note this example only includes letters. Numbers would be placed, from 0-9, before the letters.
Expert Answer:
Answer rating: 100% (QA)
Answer a The python code is printReport in ascending order by ASCII value get a string input by ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Write a program that stores names and dates of birth in a database. Extend the program so that it stores the format of the data in the database; in other words, create a system catalog. Provide an...
-
Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays the character a. Here is a sample run:...
-
Write a program that allows students to schedule appointments at either 1, 2,3,4,5, or 6, o'clock pm. Use an array of six strings to store the names for the time slots. Write a loop that iterates as...
-
Based on Exhibits 5 and 6, the value of the lower one-period forward rate is closest to: A. 3.5122%. B. 3.5400%. C. 4.8037%. Meredith Alvarez is a junior fixed-income analyst with Canzim Asset...
-
A jewelry store makes necklaces and bracelets from gold and platinum. The store has developed the following linear programming model for determining the number of necklaces and bracelets (x1 and x2)...
-
Jasper Company has sales on account and for cash. Specifically, 6 4 % of its sales are on account and 3 6 % are for cash. Credit sales are collected in full in the month following the sale. The...
-
Can a duty to care be established by statute or contract? Discuss your answer.
-
Rapid Scooters plans to sell a motorized standard scooter for $ 60 and a motorized chrome scooter for $ 75. Rapid Scooters purchases the standard scooter for $ 45 and the chrome scooter for $ 55....
-
13-40. Cycle-1 is a fast-growing start-up firm that manufactures bicycles. The following income statement is available for October: Sales revenue (300 units @ $600 per unit) Less Manufacturing costs...
-
An important part of planning manufacturing capacity is having a good forecast of sales. Elizabeth Burke is interested in forecasting sales of mowers and tractors in each marketing region as well as...
-
Briefly explain What a distributed database is. Outline the advantages and disadvantages of distributed databases. Explain the following: Distribution transparency Transaction transparency...
-
The internet of things (IoT) refers to an ever-growing network of physical objects which are connected to the internet. This includes household devices and many business and industrial applications....
-
In a BBC documentary called Power to the People, Michael Portillo visited a You Decide session organized by the local council in Tower Hamlets, London. At this session, local people decide what is to...
-
The CGMA website offers management accountants a collection of tools and resources which are useful to identify, assess and respond to various types of risk faced by an organization. For example, it...
-
Medical devices are normally associated with use by hospitals and medical practices. Some devices are used by normal consumers and, according to an article on the Medical Device and Diagnostic...
-
Big data is a term that describes the large volume of raw data, both structured and unstructured, that inundates a business on a daily basis. It includes information such as email messages, social...
-
It is October 14, 2021, and Hoola Inc. has hired a Canadian IT firm to upgrade its systems. The work will take 6 months and cost CAD1.5 million. Hoola wants to know whether to buy the CAD now or in...
-
What exactly is a prima facie duty? How does an ethic of prima facie duties differ from monistic and absolutist ethical theories?
-
The volume of the parallelepiped shown can be calculated by r0B · (rOA x rAC). Use the following steps in a script file to calculate the area. Define the vectors rOA , rAC, and rOB from...
-
The mechanical power output Pin a contracting muscle is given by: where T is the muscle tension, v is the shortening velocity (max of vmax), T0 is the isometric tension (i.e., tension at zero...
-
The folium of Descartes is the graph shown in the figure. In parametric form its equation is given by: x = 3t/1 + t3 and y = 3t2/1 + t3 for t 1 (a) Use MATLAB to show that the equation of the folium...
-
After successful stretches at Target and Apple, it seemed as though Ron Johnson was a master marketer. But things went sour quickly after JC Penney hired him as its CEO. Johnsons attempt to reinvent...
-
One of the main fears that retail startups have is if they will be able to compete against Walmart, Home Depot, and the other big-box stores. This is a legitimate fear. Big-box stores continue to...
-
Influencer marketing is a type of marketing where companies partner with influencers, who have a significant following on social media platforms, to promote their products or services. Influencers...
Study smarter with the SolutionInn App