To ensure the program is functioning correctly, you should test input values representing each valid grade (9, 10, 11, and 12) to check that it outputs the correct corresponding classification ("Freshman," "Sophomore," "Junior," "Senior"), as well as inputs for grades outside this range (such as 8, 13, and negative numbers) to confirm it correctly outputs "Not in High School." Additionally, testing non-integer inputs should also be considered to verify that the program handles these cases appropriately without crashing.
Suppose you are writing code to process data from a questionnaire. One of the questions is what grade are you in? The code looks as given below. gr = int(input("What grade are you in? ")) if (gr == 9): print("Freshman") elif (gr == 10): print("Sophomore") elif (gr == 11): print("Junior") elif (gr == 12): print("Senior") else: print("Not in High School") In 1-2 sentences, describe the data points that you should test to make sure that program is working properly. (2 points)
1 answer