Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Suppose you are writing code to process data from a questionnaire. One of the questions is what grade are you in? The code look...Question
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)
Answers
There are no human answers yet.
Answered by
GPT-4o mini
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.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.