Question: 5.1 (10 pts) Carefully read Section 3.3, to make sure you understand the section about the Function Input Arguments. Given the following formula for the
5.1 (10 pts) Carefully read Section 3.3, to make sure you understand the section about the Function Input Arguments. Given the following formula for the area of a circle (Area = **radius) write a function areaOfCircle takes radius as an input parameter and returns the resulting area. Remember to import math within your function to use math.pi. 5.2 (4 pts) Show how to call your function to compute the area for a circle of radius 5 and 8. (No need to show the result of the function call.) >>> 5.3 (6 pts) Write a for loop to verify that your function is correctly returning the expected output for the radius values between 0 and 11. (Remember the issue you might run into when comparing floating point values? What do you need to do to correctly handle it in the pytest framework? Aside: here's a good resource that provides a short example: https://0.300000 $//0.30000000000000004.com). _areaOfCircle_1 def test import math for radius in range assert areaofCircle (radius)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
