Question: NOTE: there is more than one solution that will fix this error, you must choose the best that makes the code the most readable. What

NOTE: there is more than one solution that will fix this error, you must choose the best that makes the code the most readable. What would be the best solution to fix the following error area = PI * r ** 2 builtins. NameError: name 'r' is not defined when the following function call is made: print_circle_area(2.5) And the program has the following lines of code: PI = 3.14 def print_circle_area (radius: float): calculates and prints the area of a circle of the given radius >>> print_circle_area(2.5) 19.625 area = PI * r ** 2 print(area) add the line r = 2.5 as the first line of code within the function body change the argument name from radius to r in the function definition define r with a value of 2.5 at global scope answer is not shown changer to radius in the line: area = Pl*r ** 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
