As you organize a dinner assembly for your closest friends at a restaurant in your city,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
As you organize a dinner assembly for your closest friends at a restaurant in your city, you find yourself searching for the perfect place to dine. After much contemplation, you decide to take your companions to a restaurant that accommodates the dietary restrictions of your friends. Therefore, you decided to write a Python program inquiring about any Halal, Kosher, or Vegetarian dietary needs among your party members and subsequently listing the suitable meals for dinner. Table I shows the available meals according to the dietary restrictions accommodated in this restaurant. Dish Halal Kosher Vegetarian sandwich Cost Combo Cost Burrito Available Not available Not available $13.99 $17.99 Shawarma Available Falafel Available Available Available Not available $12.99 $17.99 Available $10.99 $15.99 Table 1: The available meals according to the dietary restrictions If the invitee has a different dietary preference that does not match any of the meals in the menu above, a salad is offered for $5.99 for the salad alone, or $9.99 for a salad combo. For this assignment, you are asked to submit one file named dinner.py containing all the code required to complete this assignment. Your program should run according to the following specifications: 1 The program will ask the user to specify the number of invitees by showing the message "Please enter the number of the invited friends:" The user is expected to enter a positive integer representing the number of invitees. You can assume that the user will always provide a positive integer. 2 According to the number of invitees, your program should loop over all the invitees to gather information about each individual's dietary preferences. This is accomplished as follows: Show the user the invitee number that you are taking the information about. You should show the message "Please enter the order details for the invitee (X/Y)" where X is the invitee number and Y is the number of invitees. The program will then ask the user if the invitee has a Halal diet with the message "Do you want to order a Halal meal?" If the user answers (y in lowercase or Y in uppercase) that means yes. Anything else, even the word "yes" should be considered no. The program will then ask the user if the invitee prefers a Kosher meal with the message "Do you want to order a Kosher meal?" If the user answers (y in lowercase or Y in uppercase) that means yes. Anything else, even the word "yes" should be considered no. The program will then ask the user if the invitee prefers a Vegetarian meal with the message "Do you want to order a Vegetarian meal?" (y in lowercase or Y in uppercase) that means yes. Anything else, even the word "yes" should be considered no. The program then asks if the user wants to upgrade to a combo by printing "Do you want to upgrade to a combo?" If the user answers (y in lowercase or Y in uppercase) that means the combo price is considered. Anything else, even the word "yes" should be considered no, and the sandwich price is considered. Your program should decide what is the appropriate meal from the menu according to the collected dietary preferences for each invitee. e.g., if the user enteres y then Y then y then y, your program should serve Falafel combo for this particular friend. If the user enters Y then no then Yes then abc, the program should serve a Burrito sandwich. If the user enters Yes then no then Yes, the program should serve salad for this friend as none of the meals in the menu satisfies this preference. The program should keep asking the user these questions until all invitees' preferences are collected. 3 When all the information is gathered, your program will ask the user to tip the server by entering a positive number representing the amount in dollars to be given as a tip. The program will show "How much do you want to tip your server?" And the user is assumed to enter a positive integer for the tip. E.g., if the user entered 15, this means that the tip is $15 after tax. You then print a separator 4 The program then will display the order details as the following 5 lines: Your program prints "You have a total of X invitees with the following orders:" where X is the number of invitees. Your program then prints "Y invitees ordered Burrito. Z of them ordered combo. The cost is: $N" where Y is the total number of invitees who ordered Burrito, and Z is the number of invitees who upgraded to combo, and N is the total cost, rounded to two decimal points. Your program then prints "Y invitees ordered Shawarma. Z of them ordered combo. The cost is: $N" where Y is the total number of invitees who ordered Shawarma, and Z is the number of invitees who upgraded to combo, and N is the total cost, rounded to two decimal points. Your program then prints "Y invitees ordered Falafel. Z of them ordered combo. The cost is: $N" where Y is the total number of invitees who ordered Falafel, and Z is the number of invitees who upgraded to combo, and N is the total cost, rounded to two decimal points. Your program then prints "Y invitees ordered salad. Z of them ordered combo. The cost is: $N" where Y is the number of invitees who ordered salad, and Z is the number of invitees who upgraded to combo, and N is total cost, rounded to two decimal points. You then print a separator 5 The program then will display the total cost of the bill in three lines as follows: Your program prints "The total cost before tax is: $H 11 where H is the total cost to all orders before any tax. H is printed to the nearest two decimal places. Your program then prints "The total cost after tax is: $N " where N is the total cost to all orders after tax which is 13% of the total cost. You should use the total cost calculated in the previous step, H, to print N. And, N is printed to the nearest two decimal places. Your program then prints "The total cost after $X tip is: $Y" where X is the tip percentage amount, and Y is the total cost to all orders after the tip. You should use the total cost calculated in the previous step, N, to print Y. And, Y is rounded to the nearest integer. As you organize a dinner assembly for your closest friends at a restaurant in your city, you find yourself searching for the perfect place to dine. After much contemplation, you decide to take your companions to a restaurant that accommodates the dietary restrictions of your friends. Therefore, you decided to write a Python program inquiring about any Halal, Kosher, or Vegetarian dietary needs among your party members and subsequently listing the suitable meals for dinner. Table I shows the available meals according to the dietary restrictions accommodated in this restaurant. Dish Halal Kosher Vegetarian sandwich Cost Combo Cost Burrito Available Not available Not available $13.99 $17.99 Shawarma Available Falafel Available Available Available Not available $12.99 $17.99 Available $10.99 $15.99 Table 1: The available meals according to the dietary restrictions If the invitee has a different dietary preference that does not match any of the meals in the menu above, a salad is offered for $5.99 for the salad alone, or $9.99 for a salad combo. For this assignment, you are asked to submit one file named dinner.py containing all the code required to complete this assignment. Your program should run according to the following specifications: 1 The program will ask the user to specify the number of invitees by showing the message "Please enter the number of the invited friends:" The user is expected to enter a positive integer representing the number of invitees. You can assume that the user will always provide a positive integer. 2 According to the number of invitees, your program should loop over all the invitees to gather information about each individual's dietary preferences. This is accomplished as follows: Show the user the invitee number that you are taking the information about. You should show the message "Please enter the order details for the invitee (X/Y)" where X is the invitee number and Y is the number of invitees. The program will then ask the user if the invitee has a Halal diet with the message "Do you want to order a Halal meal?" If the user answers (y in lowercase or Y in uppercase) that means yes. Anything else, even the word "yes" should be considered no. The program will then ask the user if the invitee prefers a Kosher meal with the message "Do you want to order a Kosher meal?" If the user answers (y in lowercase or Y in uppercase) that means yes. Anything else, even the word "yes" should be considered no. The program will then ask the user if the invitee prefers a Vegetarian meal with the message "Do you want to order a Vegetarian meal?" (y in lowercase or Y in uppercase) that means yes. Anything else, even the word "yes" should be considered no. The program then asks if the user wants to upgrade to a combo by printing "Do you want to upgrade to a combo?" If the user answers (y in lowercase or Y in uppercase) that means the combo price is considered. Anything else, even the word "yes" should be considered no, and the sandwich price is considered. Your program should decide what is the appropriate meal from the menu according to the collected dietary preferences for each invitee. e.g., if the user enteres y then Y then y then y, your program should serve Falafel combo for this particular friend. If the user enters Y then no then Yes then abc, the program should serve a Burrito sandwich. If the user enters Yes then no then Yes, the program should serve salad for this friend as none of the meals in the menu satisfies this preference. The program should keep asking the user these questions until all invitees' preferences are collected. 3 When all the information is gathered, your program will ask the user to tip the server by entering a positive number representing the amount in dollars to be given as a tip. The program will show "How much do you want to tip your server?" And the user is assumed to enter a positive integer for the tip. E.g., if the user entered 15, this means that the tip is $15 after tax. You then print a separator 4 The program then will display the order details as the following 5 lines: Your program prints "You have a total of X invitees with the following orders:" where X is the number of invitees. Your program then prints "Y invitees ordered Burrito. Z of them ordered combo. The cost is: $N" where Y is the total number of invitees who ordered Burrito, and Z is the number of invitees who upgraded to combo, and N is the total cost, rounded to two decimal points. Your program then prints "Y invitees ordered Shawarma. Z of them ordered combo. The cost is: $N" where Y is the total number of invitees who ordered Shawarma, and Z is the number of invitees who upgraded to combo, and N is the total cost, rounded to two decimal points. Your program then prints "Y invitees ordered Falafel. Z of them ordered combo. The cost is: $N" where Y is the total number of invitees who ordered Falafel, and Z is the number of invitees who upgraded to combo, and N is the total cost, rounded to two decimal points. Your program then prints "Y invitees ordered salad. Z of them ordered combo. The cost is: $N" where Y is the number of invitees who ordered salad, and Z is the number of invitees who upgraded to combo, and N is total cost, rounded to two decimal points. You then print a separator 5 The program then will display the total cost of the bill in three lines as follows: Your program prints "The total cost before tax is: $H 11 where H is the total cost to all orders before any tax. H is printed to the nearest two decimal places. Your program then prints "The total cost after tax is: $N " where N is the total cost to all orders after tax which is 13% of the total cost. You should use the total cost calculated in the previous step, H, to print N. And, N is printed to the nearest two decimal places. Your program then prints "The total cost after $X tip is: $Y" where X is the tip percentage amount, and Y is the total cost to all orders after the tip. You should use the total cost calculated in the previous step, N, to print Y. And, Y is rounded to the nearest integer.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these operating system questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Here are the comparative income statements of Eudaley Corporation. Instructions (a) Prepare a horizontal analysis of the income statement data for Eudaley Corporation, using 2013 as a base. (Show the...
-
A diesel-powered tractor with a cost of $90,000 and estimated residual value of $15,000 is expected to have a useful operating life of 30,000 hours. During April, the tractor was operated 120 hours....
-
Determine the range of applied force P over which the block of mass m 2 will not slip on the wedge-shaped block of mass m 1 . Neglect friction associated with the wheels of the tapered block. m2 Hs =...
-
Match the measures of worth in the first column with the appropriate unit of measure that results from the analysis. Measure of Worth (a) Annual Worth (b) External Rate of Return (c) Future Worth (d)...
-
Kate Petusky prepared Addison Controls' balance sheet and income statement for 2013. Before she could complete the statement of cash flows, she had to leave town to attend to a family emergency....
-
Compare and contrast DDL commands with DML commands. You are requested to submit one example of SQL query for DDL and one for DML
-
Create an Amortization schedule- a. How much student debt will I bear by the time I graduate? What will my student loan payments be? b. My undergraduate student debt is $25,000. I have secured a 4%...
-
Identify the disciplines that contribute to organizational behaviour and assess the signifcance of psychology as a contributory discipline.
-
What is meant by an assessment centre?
-
Outline the models of intelligence, and identify a particular model that appeals to you, giving reasons for your choice.
-
Suppose your employer offers you a choice between a $5700 bonus and 120 shares of the company stock. Whichever one you choose will be awarded today. The stock is currently trading for $58 per share....
-
You have just taken out a five-year loan from a bank to buy an engagement ring. The ring costs $6000. You plan to put down $2000 and borrow $4000. You will need to make annual payments of $1250 at...
-
Charles has decided to open a lawn-mowing company. To do so, he purchases mowing equipment for $5,000, buys gasoline ($2.30 in gas is required to mow each yard), and pays a helper $10.00 per yard....
-
In Exercises 1-2, rewrite each verbal statement as an equation. Then decide whether the statement is true or false. Justify your answer. 1. The logarithm of the difference of two numbers is equal to...
-
By the time you are in college, you are in charge of at least some of your own finances. How well you manage your personal budget may indicate how well you will manage your companys budget on the...
-
Think of a specific full-time job you have held. Please answer the following questions according to your perception of the managers above you in that job. Circle a number on the 15 scale based on the...
-
Emma Lathburys shoulders sagged as she flipped the cardboard sign hanging in the window of her tearooms front door from Open to Closed. The normally indefatigable 52-year-old owner of Emmas Parlor...
-
Cinnamon, Inc. recorded a total deferred tax asset in Year 3 of \($12\),301, off set by a \($12\),301 valuation allowance. Cinnamon most likely: A . fully utilized the deferred tax asset in Year 3. B...
-
Midland Brands issues three-year bonds dated January 1, 2015 with a face value of $5,000,000. Th e market interest rate on bonds of comparable risk and term is 3%. If the bonds pay 2.5% annually on...
-
A company issues $1,000,000 face value of 10-year bonds on January 1, 2015 when the market interest rate on bonds of comparable risk and terms is 5%. Th e bonds pay 6% interest annually on December...
Study smarter with the SolutionInn App