Q5 - Loops Programming Exercise Krusty has difficulties tracking the total number of orders he has taken and have reques

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Q5 - Loops Programming Exercise Krusty has difficulties tracking the total number of orders he has taken and have reques

Post by answerhappygod »

Q5 Loops Programming Exercise Krusty Has Difficulties Tracking The Total Number Of Orders He Has Taken And Have Reques 1
Q5 Loops Programming Exercise Krusty Has Difficulties Tracking The Total Number Of Orders He Has Taken And Have Reques 1 (55.9 KiB) Viewed 41 times
Q5 - Loops Programming Exercise Krusty has difficulties tracking the total number of orders he has taken and have requested that the software tracks this. Write a program to allow Krusty to repeatedly take in new orders until there are no orders left for the session. The program must prompt the user if there are new orders. All user inputs are from standard input. • If the user enters N or n, the program must display the total orders taken during the session, see Sample Program Input/Output. • If the user enters y or y, the program must go through the entire process of greet the customer, show the menu, take orders and display the order summary. The program behavior is the same as Q2- Inputs, Process, Outputs and Q3 - Functions. If the user enters any other inputs other than the aforementioned values, the program must repeatedly prompt if there are new orders until a valid input is given by the user. Important: The auto-grader will only start krusty_loop.py . Ensure that your file name is correct!

Sample Program Input/Output The user inputs are appended by # and not part of the specification. Example 1 $ python3 krusty_loop.py New Order [y/N]: #n Total orders: 0 *** Example 2 $ python3 krusty_loop.py New Order[y/N]: #y Welcome to Krusty Burgers! Krusty Burger Male $ 5.10 Skills-based Test - Sample Questions • Describe the main components required for a while loop to work. • What is an infinite loop? • There are two types of loops - count-controlled and event- controlled. Explain the difference between both types and state the type of loop that is present in your program.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply