Here is a program on calculating grades. Please correct the errors in the program. # Calculating Grades (ok, let me think about this one) # Write a program that will average 3 numeric exam grades, return an average test score, a corresponding letter grade, and a message stating whether the student is passing. # Average Grade # 90+ A # 80-89 B # 70-79 C # 60-69 D # 0-59 F # Exams: 89, 90, 90 # Average: 90 # Grade: A # Student is passing. # Exams: 50, 51, 0 # Average: 33 # Grade: F # Student is failing. exam_one = int(input("Input exam grade one: ")) exam_two = input("Input exam grade two: ")) exam_3 = str(input("Input exam grade three: ")) grades = [exam_one exam_two exam_three] sum = 0 for grade in grade:  sum = sum + grade avg = sum / len(grdes) if avg >= 90:  letter_grade = "A" elif avg >= 80 and avg < 90  letter_grade = "B" elif avg > 69 and avg < 80:  letter_grade = "C' elif avg <= 69 and avg >= 65:  letter_grade = "D" elif:  letter_grade = "F" for grade in grades:  print("Exam: " + str(grade))  print("Average: " + str(avg))  print("Grade: " + letter_grade) if letter-grade is "F":  print "Student is failing." else:  print "Student is passing." Fixed:

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 7E: Write a program named GuessingGame that generates a random number between 1 and 10. (In other words,...
icon
Related questions
Question

Python programming only 

FIX THE ERRORS IN THE CODE EXERCISE

Here is a program on calculating grades. Please correct the errors in the program.
# Calculating Grades (ok, let me think about this one)
# Write a program that will average 3 numeric exam grades, return an average test score, a corresponding letter grade, and a message stating whether the student is passing.


# Average Grade
# 90+ A
# 80-89 B
# 70-79 C
# 60-69 D
# 0-59 F
# Exams: 89, 90, 90
# Average: 90
# Grade: A
# Student is passing.
# Exams: 50, 51, 0
# Average: 33
# Grade: F
# Student is failing.
exam_one = int(input("Input exam grade one: "))
exam_two = input("Input exam grade two: "))
exam_3 = str(input("Input exam grade three: "))
grades = [exam_one exam_two exam_three]
sum = 0
for grade in grade:
 sum = sum + grade
avg = sum / len(grdes)
if avg >= 90:
 letter_grade = "A"
elif avg >= 80 and avg < 90
 letter_grade = "B"
elif avg > 69 and avg < 80:
 letter_grade = "C'
elif avg <= 69 and avg >= 65:
 letter_grade = "D"
elif:
 letter_grade = "F"
for grade in grades:
 print("Exam: " + str(grade))
 print("Average: " + str(avg))
 print("Grade: " + letter_grade)
if letter-grade is "F":
 print "Student is failing."
else:
 print "Student is passing."
Fixed: 

 

 

Here is a program on calculating grades. Please correct the errors in the program.
# Calculating Grades (ok, Let me think about this one)
# Write a program that will average 3 numeric exam grades, return an av
erage test score, a corresponding Letter grade, and a message stating w
hether the student is passing.
# Average
# 90+ A
#
# 70-79
# 60-69
# 0-59
Grade
B
с
# Exams: 89, 90, 90
# Average: 90
# Grade: A
# Student is passing.
exam_3 =
D
F
# Exams: 50, 51, 0
# Average: 33
# Grade: F
# Student is failing.
=
exam_one = int(input("Input exam grade one: "))
exam_two input ("Input exam grade two: "))
str(input("Input exam grade three: "))
Transcribed Image Text:Here is a program on calculating grades. Please correct the errors in the program. # Calculating Grades (ok, Let me think about this one) # Write a program that will average 3 numeric exam grades, return an av erage test score, a corresponding Letter grade, and a message stating w hether the student is passing. # Average # 90+ A # # 70-79 # 60-69 # 0-59 Grade B с # Exams: 89, 90, 90 # Average: 90 # Grade: A # Student is passing. exam_3 = D F # Exams: 50, 51, 0 # Average: 33 # Grade: F # Student is failing. = exam_one = int(input("Input exam grade one: ")) exam_two input ("Input exam grade two: ")) str(input("Input exam grade three: "))
grades = [exam_one exam_two exam_three]
sum = 0
for grade in grade:
sum sum + grade
avg=sum / len (grdes)
if avg >= 90:
letter_grade = "A"
elif avg >= 80 and avg < 90
letter_grade = "B"
elif avg> 69 and avg < 80:
letter_grade = "C'
elif avg <= 69 and avg >= 65:
letter_grade = "D"
elif:
letter_grade = "F"
for grade in grades:
print("Exam: " + str(grade))
print("Average:
+ str(avg))
print("Grade: " + letter_grade)
if letter-grade is "F":
11
print "Student is failing."
print "Student is passing."
else:
Fixed:
Transcribed Image Text:grades = [exam_one exam_two exam_three] sum = 0 for grade in grade: sum sum + grade avg=sum / len (grdes) if avg >= 90: letter_grade = "A" elif avg >= 80 and avg < 90 letter_grade = "B" elif avg> 69 and avg < 80: letter_grade = "C' elif avg <= 69 and avg >= 65: letter_grade = "D" elif: letter_grade = "F" for grade in grades: print("Exam: " + str(grade)) print("Average: + str(avg)) print("Grade: " + letter_grade) if letter-grade is "F": 11 print "Student is failing." print "Student is passing." else: Fixed:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 7 images

Blurred answer
Knowledge Booster
Constants and Variables
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,