Discover the answers you need at Westonci.ca, where experts provide clear and concise information on various topics. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.
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 service. 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. Thank you for visiting Westonci.ca. Stay informed by coming back for more detailed answers.