Your task is to write a program that allows the user to enter text and then...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Your task is to write a program that allows the user to enter text and then reports some information about that text. Your program should do the following: 1. [1 mark] Have your program repeatedly ask the user for words to enter, until they enter "Done". 2. [3 marks] Then (only after the user has entered "Done"), print a list of all the words the user entered, but do not print the same word more than ance. For example, f the user entered "Comp", "Math", "Bio", "Math", "Chem", "Comp", "Comp", then "Done", the program would then print "Comp", "Math", "Bio", "Chem".- 3. (6 marks) Finally, your program should let the user know which word accurred most frequently among those entered in part 1. Using the above exampie, in this part the program would report that "Comp" was the most frequently entered word. If there is more than one word that occurs the most frequently, the program should report them all (eg, if the user entered "Comp" "Math" "Comp" "Bio" "Math the program should report both "Comp" and "Math"). Your task is to write a program that allows the user to enter text and then reports some information about that text. Your program should do the following: 1. [1 mark] Have your program repeatedly ask the user for words to enter, until they enter "Done". 2. [3 marks] Then (only after the user has entered "Done"), print a list of all the words the user entered, but do not print the same word more than ance. For example, f the user entered "Comp", "Math", "Bio", "Math", "Chem", "Comp", "Comp", then "Done", the program would then print "Comp", "Math", "Bio", "Chem".- 3. (6 marks) Finally, your program should let the user know which word accurred most frequently among those entered in part 1. Using the above exampie, in this part the program would report that "Comp" was the most frequently entered word. If there is more than one word that occurs the most frequently, the program should report them all (eg, if the user entered "Comp" "Math" "Comp" "Bio" "Math the program should report both "Comp" and "Math").
Expert Answer:
Answer rating: 100% (QA)
The Python code corresponding the given Question is as follows Python program to pr... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these databases questions
-
Write a program that allows the user to enter time in seconds in the text field and press the Enter key to count down the seconds, as shown in Figure 16.45d. The remaining seconds are redisplayed...
-
Write a program that allows the user to enter his or her name. The program should output a username for entry into a website. The user should be prompted to enter a first name, middle initial, and...
-
Write a Python program that allows the user to enter a four-digit binary number and displays its value in base 10. Each binary digit should be entered one per line, starting with the leftmost digit...
-
I am learning intermediate accounting and how to account for leases. I have a question about the calculation of present value for the right to use of the lease. my example specifically has a...
-
Define the binary operation on Z by x y = x + y + 1. Verify that (Z, ) is an abelian group.
-
Show that Eqs. (12.34) and (12.35) follow from Eqs. (12.32) and (12.33). (12.34) (A1(t + t)A(t))t = |12(7)|? (Ah(t + t)Ab(t))T = (1)t(12)T|12(7)|? (12.35)
-
Shiloh supplies equipment to the automotive and commercial vehicle markets and other industrial customers. It specializes in materials and designs that reduce vehicle weight and increase fuel...
-
Lynn Rogers (who just turned 30) currently earns $60,000 per year. At the end of each calendar year, she plans to invest 10% of her annual income in a tax-deferred retirement account. Lynn expects...
-
Consider the following set for n N: F = {f : {1, . . . , n} {0, 1, 2} :1 i n 1, f(i) + f(i + 1)4}. (a) Given a recurrence and boundary conditions for |F|. (b) Solve the recurrence and give an...
-
There is a lottery with n coupons and n people take part in it. Each person picks exactly one coupon. Coupons are numbered consecutively from 1 to n, n being the maximum ticket number. The winner of...
-
Like a research paper, Make a background of the current Philippine tax system including its administration and imposition of tax laws. (containing facts and opinion) ?
-
If I bought a stock 3 years ago today for $100 and it pays a $4 dividend once a year (assume a year from when I bought it) for three years (so you receive three dividends) and I now sell it for $140,...
-
A bag contains 8 red and 4 yellow marbles. Two marbles are chosen at random and not replaced. What is the probability that 1 marble will be yellow and 1 marble will be red?
-
Identify 10 social welfare programs that are a result of public policy. Provide a description of each program, including the target population the program seeks to serve. Be sure to include social...
-
Question: Implement a C++ template function variadic_max that does the following: 1. Takes an arbitrary number of arguments of any comparable type (int, double, custom types with overloaded
-
Question 1: JavaScript Program to Display Fibonacci Sequence Using Recursion. Question 2: JavaScript Program to Convert Decimal to Binary.
-
The Snedecker Corporation is considering a change in its cash-only policy. The new terms would be net one period. The required return is 2 percent per period. Current Policy New Policy Price per unit...
-
Fred Farmer needs to prepare a balance sheet for his bank. He spent the day getting the following information. Fred needs your help to build a balance sheet and evaluate it. The information was...
-
Write a new view class that displays the tree horizontally with the root on the left as shown in Figure 25.23. 33 is deleted from the tree 35) 14 3 Delete Enter a key: 33 Insert
-
Write a program that displays three fans in a group, with control buttons to start and stop all of them, as shown in Figure 16.44. Resume Reverse Pause Pause Resume Reverse Pause Resume Reverse Start...
-
Implement a class named BitOutputStream, as shown in Figure 17.22, for writing bits to an output stream. The writeBit(char bit) method stores the bit in a byte variable. When you create a...
-
You are studying survival times for mice given a drug at one of three doses (Low, Medium, or High). You define two dummy variables: (a) With these definitions, write the expressions for the mean...
-
The data in Table 8.25 were collected in order to study factors affecting the supply and demand for commercial air travel. Data on various aspects of commercial air travel for an arbitrarily chosen...
-
It is beneficial to be able to estimate the yield of useful product of a tree based on measurements of the tree taken before it is harvested. Measurements on four such variables were taken on a...
Study smarter with the SolutionInn App