Answered step by step
Verified Expert Solution
Link Copied!

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.image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions