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
Get step-by-step solutions from verified subject matter experts
