Practice · Python

Practice elif Chains

Select among many mutually exclusive cases using if/elif/else and order conditions correctly.

elif Chainswarming python…

Score to Letter Grade (variant 2)

Write a function grade_score(score) that receives a numeric score (0‑100) and returns the corresponding letter grade:

  • A for scores 90‑100
  • B for scores 80‑89
  • C for scores 70‑79
  • D for scores 60‑69
  • F for any score below 60

Example: grade_score(87) should return 'B'.

Press Run to see output, or Check to grade against the tests.

Want a whole course built around elif chains?

Start my path — free

Adaptive practice, streaks, projects with real code review. Free tier gates AI help, never content.