Question: a. Write a program to calculate the average score for uncertain number of students. 1. Define variables-score, student_no and sum 2. Use sentinel controlled

a. Write a program to calculate the average score for uncertain number of students. 1. Define variables -

a. Write a program to calculate the average score for uncertain number of students. 1. Define variables-score, student_no and sum 2. Use sentinel controlled structure to do the following: Ask user to input an integer as student score. Please do the error checking for the score. The range of score is between 0 and 100. If the score is not in the range, please display an error message and ask user to input a new score. Add the valid score to sum a. b. c. Repeat step a and b until user input a user defined sentinel value to stop the loop 3. Define a function to calculate the average - dividing sum by student_no. Please note that the average is float not integer. 4. Display the number of students, total points, and average (2 decimal places). 1b. Write a program to calculate the average score for certain number of student. 1. Define 10 elements integer array, and sum. 2. Use counter controlled structure to do the following: a. Use random generator to generate 10 integers between 0 and 100. b. Store the integers into array c. Add the score into sum. 3. Define a function to calculate the average - dividing sum by student_no. Please note that the average is float not integer. 4. Display the students' scores, total points, and average (2 decimal places).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is a Python program that uses a sentinelcontrolled structure to determine the average score for ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!