fbpx
Course Content
Python from Zero (Day 0)
About Lesson

Write a Python program that:

  1. Ask the user to enter three notes.
  2. Calculate the sum of the three notes.
  3. Divide the total sum by 3 to obtain the average.
  4. Display the calculated average on the screen.

Example of how the program could work:

Enter grade 1: 8.5
Enter grade 2: 9.2
Enter grade 3: 7.0
Your grade point average is: 8.23

Clues:

  • Uses the function input() three times to request each note from the user.
  • Converts entered notes to floating point numbers (float) before performing the calculations.
  • Declares a variable to store the total sum of the notes.
  • Add the three notes together and store the result in the total sum variable.
  • Divide the total sum by 3 to obtain the average.
  • Print the result with a clear message.
Scroll to Top