Question: COSC 1 3 3 6 , Programming Fundamentals I Laboratory Project V Functions Problem I: Restaurant Rating & Stars Goal: A restaurant receives numeric scores
COSC Programming Fundamentals I
Laboratory Project V
Functions
Problem I: Restaurant Rating & Stars
Goal: A restaurant receives numeric scores of from hive different food critics. A higher score means a better rating. The average score translates into a star rating.
Write Python program that has two functions, main and determine tars. The main function should accept input of five numeric ratings from the user using a loop. It should then calculate the average numeric score for the restaurant. The numeric average should be passed to the determine tars function that displays the number of stars based on the numeric average:
or higher:
stars
Between inclusively and :
Between inclusively and :
Between inclusively and :
Between inclusively and :
Below :
Design: Design your program logic using pseudocode in the IPO Diagram posted on the BB You need to make two separate diagrams: one for the main function and one for the determine stars function. Under INPUTS, list everything the program will need to produce the result. Under OUTPUTS, list what the program is going to produce. Under PROCESSING, list the detailed pseudocode steps needed to produce the program's output.
Input Validation: The test scores entered by the user must be in the range
Output and Sample Dialog: Display both the numeric average rounded to two decimals and the number of stars:
Enter critic's score between and :
Error: the score must be from to
Enter critic's score between and :
Enter critic's score between and :
Enter critic's score between and :
Error: the score must be from to
Enter critic's score between and :
Error: the score must be from to
Enter critic's score between and :
Enter critic's score between and :
Enter critic's score between and :
Your score of gives the rating
If the score is below a message of type Your score of gives no star rating should be shown.
Modularity: Your program should contain two functions: the main function will accept input from the user and calculate the average, and the determinestars function will display the number of stars.
Requirements:
Write your program in Python and save it as a py file with the name yourlastnameLabpy
Begin your program with a comment that includes your name and program status either "Complete" or describe any incomplete or nonfunctioning part of your program
Each function must begin with a short comment explaining what the function does
Use meaningful variable names such as totaltaxes or numcookies
Use named constants for all number values that will not be changed in the program
Use meaningful verb names for functions such as displaytaxes
The file must use the mainvariable to determine whether the file is being imported as a module or is being executed as a standalone program
Must use Fstrings
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
