Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please give detailed explanations beside each code. Thanks. Question 4a: Letter Grade (2 points) McMaster is considering a radical new grading scheme (not really) --only
Please give detailed explanations beside each code. Thanks.
Question 4a: Letter Grade (2 points) McMaster is considering a radical new grading scheme (not really) --only scores of 95 or above are ranked A, a score of 85 or above is a B, a score of 60 or above is a C, a score of 40 or above is a D, and anything below 40 is an F. Write a Python function letterGrade (score) that takes a numeric score between 0 and 100 and returns the corresponding letter grade. In [ ]: def letterGrade (score): # Your code here. return ans In [ ]: # Your Provided Sample Test Cases print("#1", letterGrade (31) == 'F') print("#2", letterGrade (50) == 'D') print("#3", letterGrade (100) == 'A'). Question 4b: Triple Letter Grade (2 points) An instructor at McMaster has grouped his students into three's. Each student gets marked individually to score an individual grade but at the end of the course, the instructor combines the grades to make a "triple-letter-grade". Write a function that takes three scores as arguments and returns the triple-letter-grade. In [ ]: def tripleLetterGrade (studenti, student2, student3): return ans In [ ]: # Your Provided Sample Test Cases print("#1", tripleLetterGrade (88,99,55) == 'BAD') print("#2", tripleLetterGrade (45,96,88) == "DAB'). print("#3", tripleLetterGrade (89,29,10) == 'BFF')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