Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Get input from user for their favorite restaurant and the food it serves, and print the stored information on a single line with an exclamation

Get input from user for their favorite restaurant and the food it serves, and print the stored information on a single line with an exclamation point.
Objective
Use what you know about the print function to override the default behavior and control the output.
Description
This program is very similar to the previous one, where you will prompt the user for their favorite restaurant and food, save the input they give, then print the appropriate message as shown below.
This time, you will print all of the output on one line, and put an exclamation point at the end.
Example: If the user types in Sansu and Sushi
Then the output should be:
Sansu is my favorite restaurant. They serve delicious Sushi!
Once again, your program must work no matter what restaurant and food the user might enter.
Try out your program first before submitting it for a grade with the Check It button. If it doesnt work at first, examine what the feedback is telling you, and try again. Try It as many times as you like until you think it looks correct.
TRY IT
You may find it challenging to get the exclamation point at the end of the sentence, and thats fine, and its normal. Do not google how to do this, look online, or ask others. There are lots of ways to accomplish this, but you should only use techniques we have learned so far in this class. If you use some other technique to get the points for this exercise, you will not be able to do well on the quizzes and exams.
THINK about what you know about the print functions default behavior, and how to change that, in order to accomplish what you need.
This is the kind of thing that you need to get out of this class - problem solving with the tools you have in order to use them effectively, not simply looking something up on google. If you do this correctly, you will gain a deeper understanding of the print function and what it does, while looking something up on google will not.
Remember, your program has to work for any possible restaurant and food the user might enter, not just Sansu and Sushi.
Once you think everything looks right and your program will also work correctly if the user entered Tomato Brothers and spaghetti and meatballs, or anything else they might come up with, check it for a grade. For this exercise, you can revise and re-check as many times as you need to.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions