Create a python program that allows a professor to input test results, and calculate the average and high score. The professor is not sure how many students took the exam that day, so you'll need to use a loop that iterates until the professor indicates there are no more students to enter.   Include field validation logic to ensure the professor has entered valid test scores.   You'll need an accumulator and counter variable to calculate the average.   To determine the high, you'll need a variable that stores the current high score as you're iterating thru all the students' results. If a given student's score is higher than the current high score, that becomes the new high score. Initialize the high score to a 0 so the first student's score is automatically higher.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.7: Do While Loops
Problem 2E: (Misc. application) a. Write a program that continuously requests a grade to be entered. If the...
icon
Related questions
Question

2. Class Exam Results

 

Create a python program that allows a professor to input test results, and calculate the average and high score. The professor is not sure how many students took the exam that day, so you'll need to use a loop that iterates until the professor indicates there are no more students to enter.

 

Include field validation logic to ensure the professor has entered valid test scores.

 

You'll need an accumulator and counter variable to calculate the average.

 

To determine the high, you'll need a variable that stores the current high score as you're iterating thru all the students' results. If a given student's score is higher than the current high score, that becomes the new high score. Initialize the high score to a 0 so the first student's score is automatically higher.

 

Once the loop has ended, you've got all the information you need to print the class average, number of students and the high exam score.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT