Page 1 of 1

Question: Average score Write a program that uses loops to collect data and calculate the average score over a number of

Posted: Sun May 15, 2022 12:40 pm
by answerhappygod
Question: Average score
Write a program that uses loops to collect data and calculate
the average score over a number of tests for a number of students.
You can use Small Basic, Python, Java, or any language you
choose
The program should :
1. first ask the user to enter the number of students in the
range of 1 to 10.
2. then the program asks the user to enter the number of tests
(in the range of 1 to 5)
3. Then use a loop to collect the scores for those many tests
for each student. The outer loop will iterate once for each
student. The inner loop will iterate several times, once for each
test. Each iteration of the inner loop will ask the user to enter
the score for a test of a student.
3. After all iterations, the program should calculates and
display the total scores and average score for each student.
Note:
1. If you use Small Basic, go to smallbasic.com. You can code
online directly. Save your program in a file and upload the
file
2. If you use Python, Java, or C++, or other languages, you can
use any online programming platform, such as repl.it, codechef.com,
tutorialpoint.com (click the code ground). Copy the url of your
program and submit the url.
Requirements:
Upload the .sb file (.py file, or .java file, or .cpp file) when
you turn in the assignment
or Share your repl.it link for your program