Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# Tests for computeGrade def test_computeGrade_1 (): assert computeGrade(90) == A def test_computeGrade_2 (): assert computeGrade(80) == def test_computeGrade_3 (): assert computeGrade(79.9) == C
# Tests for computeGrade def test_computeGrade_1(): assert computeGrade(90) == "A" def test_computeGrade_2(): assert computeGrade("80") == "" def test_computeGrade_3(): assert computeGrade(79.9) == "C" def test_computeGrade_4(): assert computeGrade(101) == "" def test_computeGrade_5(): assert computeGrade(-1) == ""
def computeGrade(percentage): ''' - Return the corresponding letter grade string based on the value of percentage using the following scale: [100 - 90]: 'A' (90 - 80] : 'B' (80 - 70] : 'C' (70 - 60] : 'D' (60 - 0] : 'F' - If percentage is not a number type (int or float) OR if percentage is outside the range of [100 - 0], return an empty string (""). ''' return "stub"
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