CJCoding With Joseph
15free / daySign inCreate account

Letter Grade Function

Write a function letter_grade(mark: float) -> str that returns A for a mark of 80 or more, B from 70 up to but not including 80, C from 60, D from 50, and F below 50, using one if / elif / else chain. Do NOT write a main block or any top-level test code; the tests construct the calls. Input: one line, the mark as a decimal number, which the tests read and pass to your function before printing the letter it returns.

Expected Output:

A

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
User InputType Hints
📥 Auto-Input:
91.5\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.