Ask Question
2 December, 02:29

Jimmy wrote the procedure scoreToGrade which accepts as a parameter score - a quiz score in the range 0-100. The procedure is supposed to return a letter grade. He feels confident his program is correct because he has tested it using the scores 3, 29, and 67. Sally believes the program is incorrect because she tested the values 73 and 86. The code is syntactically correct, and the programs runs without generating an error, but the results are sometimes wrong. Why does the procedure return the correct values for Jimmy's tests but not Sally's?

+2
Answers (1)
  1. 2 December, 02:57
    0
    There must be a logical error while checking the score

    Explanation:

    Jimmy claims that the program works fine, but he did not test the values that are above 67. When Sally tested 73 and 86, which are greater than 67, she gets an error.

    Sally claims that the program does not work, but she did not test the values that are below 73.

    These imply that Jimmy made a logical error when he compared the values that are greater than 67.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Jimmy wrote the procedure scoreToGrade which accepts as a parameter score - a quiz score in the range 0-100. The procedure is supposed to ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers