Question: Given that the following code is incorrect, what code would fix the following code snippet? grade = int(input(Enter student grade: )) if grade >= 90

Given that the following code is incorrect, what code would fix the following code snippet?

grade = int(input("Enter student grade: ")) if grade >= 90 : letterGrade = "A" if grade >= 80 : letterGrade = "B" if grade >= 70 : letterGrade = "C" if grade >= 60 : letterGrade = "D" else : letterGrade = "E" print(letterGrade)

Select one: a. Change the if statements to else statements (except the first one) b. Change the if statements to elif statements (except the first one) c. Change the last statement to if instead of else d. Reverse the order of the if statements

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!