Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a python code JCU Subject results explained shows the percentage score result you need to get different grades: Below 50% EN 50 up to
write a python code
JCU Subject results explained shows the percentage score result you need to get different grades: Below 50% EN 50 up to but not including 65 =P 65 up to but not including 75=C 75 up to but not including 85 =D . 85 and over = HD Note: think about the boundary conditions and don't miss anything. Remember to test your boundaries. Suppose you used 84 as your boundary, e.g. If score > B4 then HD Would that work? No, because what if the score were 84.1? That should be a D, but your code would make it an HD! This is where bugs come from :( Our strong recommendation is that you always use the values in the question. In this case, use 50, 85, etc. not 49, 49.9, or whatever. This will help prevent mistakes. Write a function that takes a subject total score and returns the corresponding JCU grade. Check: Are you getting used to this kind of wording? If the function "takes" a score, it means you must pass it into the function as a parameter. If the function "returns" a grade, it means you don't print it, you... return it Test it! Like we've done before (see the pattern?), write a separate function to test that all the grades can be produced correctly When your tests all pass, write a main program that asks the user for their score and prints their grade until they enter a score of Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started