Answered step by step
Verified Expert Solution
Question
1 Approved Answer
plz use python to fill up the rest of rows thanks. Suppose that you are a teacher and you've set the following problem for your
plz use python to fill up the rest of rows thanks.
Suppose that you are a teacher and you've set the following problem for your students: Write a function get_area(radius) which takes a radius as a parameter and returns the area of a circle. Round the result to the nearest integer. The program should return "Invalid input" when the radius is negative and "Not a circle" when the radius is 0. The area of a circle is given by the formula: T*p2. You have to write the tests for this function in the answer box below. Each test should consist of a bit of code that should be run together with the expected output ('Expected Result'). Your test code should call the function get_area() which we supply. Do not include a get_area() function in your test. Answer: (penalty regime: 0%) Reset answer Test Expected Result print(get_area(3.5)) 39 print(get_area(-3.5)) Invalid input print(get_area(0)) Not a circleStep 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