Site icon Study Fy

Write a Python program that asks the user for a student’s grades on five exams. Define the following function: get_score: Asks the user for a single test score (you may assume the user will enter an integer for this one). If the integer entered is less t

Write a Python program that asks the user for a student’s grades on five exams. Define the following function: get_score: Asks the user for a single test score (you may assume the user will enter an integer for this one). If the integer entered is less t

Question Description

Write a Python program that asks the user for a student’s grades on five exams. Define the following function:

    • get_score: Asks the user for a single test score (you may assume the user will enter an integer for this one). If the integer entered is less than 0 or greater than 100, ask them to re-enter the score. Once a valid score is entered, return it.

Your main function should call get_score five times, appending each return value to a list. It should then iterate over that list to calculate the student’s average score. Print the average out using the print function.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Exit mobile version