You've learned how if, elif, and else let a program pick exactly one path. A grading scale is a perfect real-world use: each grade is just the next range down, so a single flat if/elif/else chain handles every case without any nesting.
A school's gradebook converts a numeric test score into a letter grade. You'll finish the logic that does the conversion.
The first branch (if score >= 90: print("A")) is already written for you in the editor. Your job is to add the rest of the chain so every possible score gets the right letter.
Your tasks
Given this starting value:
1. Add an elif branch that handles scores of 80 or above and prints B
2. Add a second elif branch that handles scores of 70 or above and prints C
3. Add an else branch that handles every remaining score (below 70) and prints F
When you run it with score = 85, the first true branch is score >= 80, so your program should print the letter B.
Expected output
B
Constraints
- Build a single
if / elif / else chain — do not write a separate if statement for each range
- Keep the chain flat: no nested
if is needed or wanted here
- Order matters. Python checks the branches top to bottom and runs the first one that is true, so your ranges must go from highest to lowest
- Print only the single letter (for example
B), with no extra text or labels
- Do not change the value of
score — your chain must work for any score, not just 85