12. Challenge Grade Calculator

12.1 Calculate grade using if

Here are the requirements of this challenge.

John has taken Maths test which has 100 questions.

  1. Ask John to input how many questions he got right.

  2. If the answer is more than 100 then print “That’s not possible”.

  3. If the score is 100 then print “You got A+ grade”.

  4. If the score is more than 80 and less than 100 then print “You got A grade”.

  5. If the score is more than 60 and less than 81 then print “You got B grade”.

  6. If the score is more than 40 and less than 61 then print “You got C grade”.

  7. If the score is more than 20 and less than 41 then print “You got D grade”.

  8. If the score is more than 0 and less than 21 then print “You got E grade”.

  9. If the score is 0 then print “You got F grade”.

Use only if conditions to solve this problem.