Westonci.ca is the Q&A platform that connects you with experts who provide accurate and detailed answers. Explore thousands of questions and answers from knowledgeable experts in various fields on our Q&A platform. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.
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")
Thank you for choosing our platform. We're dedicated to providing the best answers for all your questions. Visit us again. Thank you for choosing our platform. We're dedicated to providing the best answers for all your questions. Visit us again. Westonci.ca is committed to providing accurate answers. Come back soon for more trustworthy information.