Page 1 of 1

P4HW2 - Pizza Order Introduction: Assignment assess student ability to edit and enhance exiting programs Instructions: F

Posted: Sun May 15, 2022 11:49 am
by answerhappygod
P4hw2 Pizza Order Introduction Assignment Assess Student Ability To Edit And Enhance Exiting Programs Instructions F 1
P4hw2 Pizza Order Introduction Assignment Assess Student Ability To Edit And Enhance Exiting Programs Instructions F 1 (124.23 KiB) Viewed 56 times
P4HW2 - Pizza Order Introduction: Assignment assess student ability to edit and enhance exiting programs Instructions: For assignment P4HW2 you will build on P3HW2 assignment. The program however will NOT terminate if user enters an incorrect value for number of people sharing a pizza. Instead it notifies user of mistake and asks for a correct number to be entered. Instructions: • Create a new Python code file named P4HW2_LastnameFirstname.py (replace "Last" with your own name) Add a title comment block to the top of the new Python file using the following form: # # P4HW2 - Pizza Order # Your Name # Date # • Ask user to enter number of students she/he would like to order pizza for. (5 points) Ask user for number of people that will be sharing each pizza (1.5, 2 or 3). (5 points) • If user enters a value OTHER than 1.5, 2 or 3, the program is to do the following: (30 points) 1. Display an error and notify user that they should have entered 1.5, 2 or 3. 2. Ask to user to ENTER a correct number. Note, program DOES NOT Terminate this time. See example below How many students do you want to order pizza for? 25 Enter number of people per pizza ( 1.5, 2 or 3): 4 TNVALID ENTRY!!!! Should have en Lered 1., 2 or 3 Enter number of people per pizza again.( 1.5, 2 or 3): | • If user enters a correct value (1.5, 2, or 3), program does the following (10 points) . Calculate number of Whole pizzas user needs to buy . Calculate price for number of pizzas needed, assuming one pizza costs $5. Don't forget 6% tax. Display the following: · number of whole pizzas the user needs to purchase. Remember, a whole number needs to be displayed • Price, including 6% tax • Ask user if they wish to run Program AGAIN? Program only terminates if user chooses NOT to run program again. (40 points) See example below Enter number of people per pizza again. ( 1.5, 2 or 3): 1.5 ----Pizza Order---- Number of Students : 25 Pizzas Needed :17 Price $88.33 Would you like to run program again (y for yes): | Write program Pseudocode (detail algorithm) and add it as a comment block. (10 points) Important: Upload the assignment to the GitHub account you created. Note that at the end the semester, you will be graded on whether or not you have uploaded assignments on GitHub. Grading Criteria: Refer to the grading criteria posted in the "Assignments tab" Note: ONLY USE PROGRAMMING METHODS LEARNED IN CLASS. If submission doesn't comply, you will get a grade of "1".