Question: can you help me write this code in python and c++ NOte: beginner level create a program and a function that takes the level to
can you help me write this code in python and c++ NOte: beginner level
-
create a program and a function that takes the level to grade and returns the middle percentage mark
-
accept a string type (ex. 4+ or R) as a level and return an integer as the percentage
-
Level [1] Percent [2] 4+ 95% - 100% 4 87% - 94% 4- 80% - 86% 3+ 77% - 79% 3 73% - 76% 3- 70% - 72% 2+ 67% - 69% 2 63% - 66% 2- 60% - 62% 1+ 57% - 59% 1 53% - 56% 1- 50% - 52% R 0% - 49% -
usually we only place one (1) return statement at the very end of our function, not several inside an if statement
-
if "invalid" input is passed to the function (a string that is not a valid level), then return a "-1"
-
"-1" is commonly used as a return value that means there has been an error
-
-
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
