Question: Write a python program that calculates what percentage of students passed a specific course and what is their average final score, and displays the result

Write a python 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:

  1. Display a message stating its goal

  2. Ask the users to input how many students are in a specific course.

  3. 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)

  4. 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)

  5. Calculate the average score of the students who passed the course (make sure to only calculate for those who passed)

  6. Open a new graphic window, which will display:

    1. Your name

    2. How many students are entered for the course

    3. How many students passed the course

    4. What percentage of the students passed the course

    5. What is the average grade score of the students who passed

    6. If more than 70% of the students passed the course, the graphic window should also include a happy face.

    7. 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

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!