Question
Write a program that calculates what percentage of students passed a specific course and what is their average final score, and displays the result in
Write a program that calculates what percentage of students passed a specific course and what is their average final score, and displays the result in a graphic window.
The program should:
-
Display a message stating its goal
-
Ask the users to input how many students are in a specific course.
-
For each student, assign and output a random final score between 0 and 100 (use the definition for a function defined in the previous assignment)
-
Calculate how many and what percentage of the students passed the course (in order to pass, a student must receive a final grade of 60 or higher)
-
Calculate the average score of the students who passed the course (make sure to only calculate for those who passed)
-
Open a new graphic window, which will display:
-
Your name
-
How many students are entered for the course
-
How many students passed the course
-
What percentage of the students passed the course
-
What is the average grade score of the students who passed
-
If more than 70% of the students passed the course, the graphic window should also include a happy face.
-
If less than 70% of the students passed the course, the graphic window should also include a sad face.
-
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started