You will write a Python function that turns a mark into a grade, as the nested IF statement of the lesson does. You will also add a check for marks that are out of range.
Your tasks.
grade, return "Invalid" when the mark is below 0 or above 100."A" for 80 and above, "B" for 65 to 79, "C" for 50 to 64 and "U" below 50.boundary to the list of the grades for the marks in tests, in order.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…