Grade One Mark
Python
15 pts
Grade One Mark
Given mark = 78:
- Use
if/elif/elseto create a variablegrade:"A"for 90 and above,"B"for 80 and above,"C"for 70 and above,"D"for 50 and above, otherwise"F". - Create
resultwith a ternary operator:"pass"if the mark is 50 or more, else"fail". - Print the line shown below using both variables.
Expected output:
Grade: C (pass)
Checklist
- Use
if/elif/elseto setgradefrommark. - Create
resultwith a ternary operator. - Print the grade and the result in one line.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
