QUESTION IMAGE
Question
get 3 grades from the user, store it in a list, calculate the average, check see if it is over 60, print you passed! and if it is under 60, print you failed!
Step1: Create an empty list
grades = []
Step2: Get 3 grades from user and append to list
for i in range(3):
grade = int(input("Enter a grade: "))
grades.append(grade)
Step3: Calculate the average
average = sum(grades)/len(grades)
Step4: Check if average is over 60
if average > 60:
print("you passed!")
else:
print("you failed!")
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The program will prompt for 3 grades, calculate their average and print whether the user passed or failed based on if the average is over 60.