12. Challenge Grade Calculator

12.2 Calculate grade using range

Here are the requirements of the challenge.

User has taken Maths test which has 100 questions.

  1. Ask user 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 if and range conditions to solve this problem.