Answer:
print("What year of high school are you in?")
grade = input()
grade = grade.lower()
if grade == "freshman":
print("You are in grade: 9")
elif grade == "sophomore":
print("You are in grade: 10")
elif grade == "junior":
print("You are in grade: 11")
elif grade == "senior":
print("You are in grade: 12")
else:
print("Not in high school")
Step-by-step explanation:
The first line prints the question. "grade = input()" stores the answer the user will type in the terminal into the variable 'grade'.
grade.lower():
The third line lowercases the entire string ("FreshMan" would turn to "freshman"). Python is case-sensitive.
Then, test the string to see if it matches freshman, sophomore, junior, or senior. If the input string matches print the statement inside the if block. The last statement is the else. It prints if nothing else matches.