Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Algorithm error for correct code. Can't use modulo operation here. Fundamentals of Programming Assignments > Programming 21- Unit Tests Programming 21- Unit Tests -2020 muncements

Algorithm error for correct code. Can't use modulo operation here.

image text in transcribed

Fundamentals of Programming Assignments > Programming 21- Unit Tests Programming 21- Unit Tests -2020 muncements The formula below calculates a curved grade by applying a square root: curved grade - original grade 10 Define a function named curve_grade that consumes a grade and uses the formula to return the curved grade. Write at least three unit tests for the function to confirm that it works. ules us nments Console: curved grade of 5.ee is: 22.360680 curved grade of 7.ee is: 26.457513 curved grade of 9.ee is: 30.000000 Feedback: Algorithm Error View Trace Incompatible types You used a modulo operation with a string and a tuple on line 5. But you can't do that with that operator. Make sure both sides of the operator are the right type. Jorations Evaluate Gallery Run 1Blocks Split Text Reset Import datasets Upload History edia 1 def curved grade (originalgrade): return (original grado **0.5) - 10 Eval (original grade, curved grade (original grade))) elp on Circleln y Dashboard 4 original grade = 5 print(" curved grade of 8.2 is: 12" 6 original grade - 7 7 print("curved grade of 1.2 is: 62" B original grade = 9 9 print("curved grade of 5.2 is: 12f " (original grade, curved grade (original grade) (original grade, curved grade (original grade))) A 2 3 :08 PM

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

More Books

Students also viewed these Databases questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago