Creating a Test and Debug Plan Quick Check 2 of 52 of 5 Items Question Suppose you are writing a program to convert numeric grades to letter grades: print("Enter numeric grade: ") avg = int(input()) if avg >= 90 and avg <= 100: print("Your Grade is A") elif avg >= 80 and avg < 90: print("Your Grade is B") elif avg >= 70 and avg < 80: print("Your Grade is C") elif avg >= 60 and avg < 70: print("Your Grade is D") elif avg >= 0 and avg < 60: print("Your Grade is F") else: print("Invalid Input!") You want to test that program is working properly. What is the minimum number of data points that you will need to test to make sure that program is working properly? (1 point) Responses 11 11 6 6 13 13 5 5 Skip to navigation page 5 of 5

1 answer

To determine the minimum number of data points needed to test the program that converts numeric grades to letter grades, we should consider the different ranges of grades defined in the code:

  1. Grade A: [90, 100]
  2. Grade B: [80, 89]
  3. Grade C: [70, 79]
  4. Grade D: [60, 69]
  5. Grade F: [0, 59]
  6. Invalid Input: any value less than 0 or greater than 100

To adequately test the program, one test case from each defined grade range plus additional cases for the lower and upper boundaries of valid inputs and a case for invalid input is required. This would include:

  • A test case for A (e.g., 90)
  • A test case for B (e.g., 80)
  • A test case for C (e.g., 70)
  • A test case for D (e.g., 60)
  • A test case for F (e.g., 59)
  • One case for invalid input (e.g., -1)

Therefore, the minimum number of unique test cases needed would be 6: one for each grade category and one for invalid input.

So the correct answer is: 6.