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...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
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...
-
On-Time Delivery Company acquired an adjacent lot to construct a new warehouse, paying $90,000 and giving a short-term note for $50,000. Legal fees paid were $1,750, delinquent taxes assumed were...
-
Do you think that the regulation described in Problem 27-6 is more likely an example of the capture hypothesis or the share-the-gains, share the pains theory? Why? Problem 27-6 Research into...
-
Palestine Corp. earned net income of \(\$ 108,000\) for 2007. Palestine's books include the following figures: Requirement Compute Palestine's EPS for the year. Preferred stock, 6%, $50 par, 1,000...
-
Antikron Company produces rubber seals used in the aerospace industry. Standards call for 4 pounds of material at $3.50 per pound for each seal. The standard cost for labor is .6 hours at $21 per...
-
A company grows in value by 10% each year, and also gains 25% of a growing market estimated at 100e0.1 million dollars, where t is the number of years that the company has been in business....
-
You wish to invest $1000 over one year in two accounts paying 5% and 6% annually. How much should you invest in each to earn $58?
-
Describe the product life cycle concept. Why is the product life cycle so critical to sports marketers? What is it used for? How can the product life cycle be extended?
-
Define sports involvement from the spectator perspective. Why is it important to understand the levels of involvement among spectators?
-
Describe the different ways that sports sponsorships might be evaluated. Which evaluation tool is the most effective?
-
In what stage of the product life cycle is Major League Baseball? Support your answer with research.
-
What is behavioral segmentation? What are some of the common behaviors that sports marketers would use for segmentation purposes?
-
Fill-in the blank. The S x2 sin 8xdx equals cos 8x + -Ssin 8xdx]. A. -sin 8x C. x sin 8x D. -x sin 8x B. x sin 8x
-
Gordon and Lisa estimate that they will need $1,875,000 in 40 years for their retirement years. If they can earn 8 percent annually on their funds, how much do they need to save annually?
-
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...
-
Which out of the following boiler is capable of generating superheated steam without additional accessories ? (a) Cochran (b) Lancashire (c) Locomotive (d) Cornish
-
Which of the following are boiler mountings ? (a) Economiser (b) Fusible plug (c) Super heater (d) Injector
-
The economiser of the boiler plant is used mainly to (a) increase steam capacity (b) reduce fuel consumption (c) increase steam pressure (d) increase life of the boiler
Study smarter with the SolutionInn App