Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the correct way to write this code? Thanks! Fundamentals of Programming > Assignments > Programming 21- Unit Tests 2020 Programming 21- Unit Tests

What is the correct way to write this code?

image text in transcribed

Thanks!

Fundamentals of Programming > Assignments > Programming 21- Unit Tests 2020 Programming 21- Unit Tests incements BlockPy: #21.4) Grading on a Curve 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. les us aments Console: curved grade of 5.ee is: 50.00 curved grade of 7.00 is: 70.00 curved grade of 9.00 is: 90.00 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. orations Gallery Evaluate edia Run Blocks Split Text Reset Import datasets Upload- History Eval elp on CircleIn Py Dashboard (original grade, curve grade (original_grade))) I def curve grade (original grade): 2 return (original_grade) *10 3 original grade=5 print("curved grade of 8.2 is: 1.2" 5 original grade-7 print("curved grade of t. 2 is: 1.2" original grade-9 print("curved grade of 1.2 is: 1.21" ( original grade, curve grade (original grade))) (original grade, curve grade (original grade))) A 2:33 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

Students also viewed these Databases questions