Create a program that allows users to enter a sentence in either past or present or...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a program that allows users to enter a sentence in either past or present or tense and get back the other tense. They should also include today for present tense and yesterday for past tense. For example, if a user enters: I eat today. They should get back: I ate yesterday. Make sure ALL the following inputs are accounted for (meaning if any of these inputs are used, the program is expected to work correctly): I eat today. -> I ate yesterday. I walk today. -> I walked yesterday. She flies today. ->She flew yesterday. He dances today. -> He danced yesterday. We cook today. →> We cooked yesterday. They bake today. -> They baked yesterday. You speak today. →> You spoke yesterday. It shakes today. -> It shook yesterday. He leaves today. -> He left yesterday. Additionally, if a verb follows the standard past tense rule (meaning it ends with -ed), it should also work for this program. For example, the verb brush in past tense is brushed and so if someone enters a sentence using this word, the program should work correctly even though it is not included in the list above. A verb like fall however does not end in -ed (the past tense would be fell) and so does not need to be accounted for in this program. Example run: Please enter a sentence or q to quit: She ate yesterday. Present tense is: She eats today. Please enter a sentence or q to quit: I walk today. Past tense is: I walked yesterday. Please enter a sentence or q to quit: q BYE! Create a program that allows users to enter a sentence in either past or present or tense and get back the other tense. They should also include today for present tense and yesterday for past tense. For example, if a user enters: I eat today. They should get back: I ate yesterday. Make sure ALL the following inputs are accounted for (meaning if any of these inputs are used, the program is expected to work correctly): I eat today. -> I ate yesterday. I walk today. -> I walked yesterday. She flies today. ->She flew yesterday. He dances today. -> He danced yesterday. We cook today. →> We cooked yesterday. They bake today. -> They baked yesterday. You speak today. →> You spoke yesterday. It shakes today. -> It shook yesterday. He leaves today. -> He left yesterday. Additionally, if a verb follows the standard past tense rule (meaning it ends with -ed), it should also work for this program. For example, the verb brush in past tense is brushed and so if someone enters a sentence using this word, the program should work correctly even though it is not included in the list above. A verb like fall however does not end in -ed (the past tense would be fell) and so does not need to be accounted for in this program. Example run: Please enter a sentence or q to quit: She ate yesterday. Present tense is: She eats today. Please enter a sentence or q to quit: I walk today. Past tense is: I walked yesterday. Please enter a sentence or q to quit: q BYE!
Expert Answer:
Answer rating: 100% (QA)
Heres the Python code for the program def getoppositetensesentence list of irregular ... View the full answer
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date:
Students also viewed these programming questions
-
In this assignment, you will create a program that allows theuser to draw in a window using brushes of different sizes andcolors. The user will be able to change the size and color of thebrush using...
-
In this exercise, you will create a program that allows the user to enter an employees gross pay amount as well as his or her filing status and number of withholding allowances. The program should...
-
In this exercise, you will create a program that allows the user to enter an unknown number of sales amounts for each of three car dealerships: Dealership 1, Dealership 2, and Dealership 3. Use a...
-
The use of prenumbered checks in disbursing cash is an application of the principle of: (a) establishment of responsibility. (b) segregation of duties. (c) physical controls. (d) documentation...
-
Indicate whether each of the following types of transactions will either (a) Increase stockholders equity or (b) Decrease stockholders equity: 1. Issuing capital stock in exchange for cash. 2....
-
Use the dispersion relation (4.10), for the transverse mode of propagation in a cold isotropic electron gas (with B 0 = 0), to calculate the damping factor = I{k}. Show that, when pe , the...
-
What are the differences between a domestic bond, a Eurobond and a foreign bond?
-
Sala Co. is contemplating the replacement of an old machine with a new one. The following information has been gathered: If the old machine is replaced, it can be sold for $20,000. 1. Which of the...
-
Filer Manufacturing has 6,294,304 shares of common stock outstanding. The current share price is $44.58, and the book value per share is $7.96. Filer Manufacturing also has two bond issues...
-
Freddy Frolic consumes only asparagus and tomatoes, which are highly seasonal crops in Freddys part of the world. He sells umbrellas for a living, which provides a fluctuating income depending on the...
-
What would you suggest to improve if needed to improve the trend Return on Assets? What does the ROA mean from these calculations? What would you suggest to improve if needed to improve the trend...
-
Why does a trade sale take longer to execute than an initial public offering?
-
Define business ethics. What groups determine whether a business activity is ethical?
-
Discuss the major modes of value realization in terms of full and partial harvesting. What are the key advantages and disadvantages of each method?
-
Define the concept of differential analysis. How is this concept different from the traditional approaches used to assess acquisitions?
-
What are the financial and non-financial determinants of value creation?
-
You are the lead project manager for two product launches. Product Redesign is a redesign of your company's bestselling product. Product New is a completely new product in a new product category. The...
-
Review Exhibit 11.4. Analyze each product on the graph according to the characteristics that influence the rate of adoption. For example, what can you conclude from the data about the relative...
-
If necessary, create a new project named Intermediate24 Project and save it in the Cpp8\Chap14 folder. Also create a new source file named Intermediate24.cpp. If you are using Microsoft Visual C++,...
-
Which of the following should a program use to store the name of any city in a string variable named cityName? a. cin >> cityName; b. cin(cityName); c. getline(cityName, cin); d. getline(cin,...
-
Which of the following conditions evaluates to true when the letter variable contains the letter Z in either uppercase or lowercase? a. if (letter = 'Z' || letter = 'z') b. if (letter == 'Z' ||...
-
Comparative Data Comparative stockholders' equity sections from two successive years of balance sheets from Kirkwood, Inc., are as follows: No dividends were declared or paid during 2018. Required...
-
The stockholders' equity LOS, 6,8 accounts of Cooper Corporation at January 1 follow: During the year, the following transactions occurred: Jan. 5 Issued 20,000 shares of common stock for \(\$ 15\)...
-
The stockholders' equity of Ranger Corporation at January 1 appears below: During the year, the following transactions occurred: May 12 Declared a 15 percent stock dividend; market value of the...
Study smarter with the SolutionInn App