Answer to Question #291268 in Python for Shayan

Question #291268

Write a user-define function, called AreaOfCircle, that calculates and prints the area of a circle given its radius as input using Python input () function.

Note: You want to use the proper arithmetic operations, calculate, and print the proper value for the scenario described below:

At the beginning of your code, you need to use math module, ask for the radius of the circle. Then calculate the area of the circle and print the result using a proper message. For example, the area of the circle is …  


1
Expert's answer
2022-01-27T12:54:50-0500
import math


def Area_of_circle(radius):
    area = 3.14  * radius * radius
    return area


radius = int(input('Enter the radius of circle : '))


print('Area of circle is ', Area_of_circle(radius))

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