Answer:
grade = int(input("What grade are you in?")
if grade == 9:
print ("Freshman")
elif grade == 10:
print ("Sophomore")
elif grade == 11:
print ("Junior")
elif grade == 12:
print ("Senior")
else:
print ("Invalid")
Step-by-step explanation:
You fail to provide the complete code. So, I will rewrite the code from scratch
The complete question requires that the level is printed based on the input grade.
The code has been added in the answer section.
The explanation is as follows:
[Thus gets input for grade]
grade = int(input("What grade are you in?")
[If grade is 9, this prints Freshman]
if grade == 9:
print ("Freshman")
[If grade is 10, then level is sophomore]
elif grade == 10:
print ("Sophomore")
[If grade is 11, then grade is Junior]
elif grade == 11:
print ("Junior")
[If grade is 12, then level is senior]
elif grade == 12:
print ("Senior")
[All other inputs are invalid]
else:
print ("Invalid")