Answer to Question #237603 in Python for Joel

Question #237603

Write your own function that illustrates a feature that you learned in this unit . The function must take time at least one argument .

. The code for the function

. The inputs and outputs to three calls of your function

.A description of what features your function illustrates


1
Expert's answer
2021-09-19T05:51:09-0400
# function for finding the area of ​​a circle
def compute_surface(radius):
    from math import pi
    return pi * radius * radius
 
R = input("Enter radius: ")
S = compute_surface(float(R))
print("Area of circle with R = ", R, " is ", S)
 
R = input("Enter radius: ")
S = compute_surface(float(R))
print("Area of circle with R = ", R, " is ", S)
 
R = input("Enter radius: ")
S = compute_surface(float(R))
print("Area of circle with R = ", R, " is ", S)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS