Explore Westonci.ca, the premier Q&A site that helps you find precise answers to your questions, no matter the topic. Connect with professionals on our platform to receive accurate answers to your questions quickly and efficiently. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.
Sagot :
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")
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")
Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. Thank you for choosing our platform. We're dedicated to providing the best answers for all your questions. Visit us again. We're dedicated to helping you find the answers you need at Westonci.ca. Don't hesitate to return for more.