Answered step by step
Verified Expert Solution
Link Copied!

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

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

Step: 3

blur-text-image

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

What is the function of the trial balance?

Answered: 1 week ago