I Haz Codes

Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Menu
area of a circle

Copy the code below into a new file and save it as “area.py”.

To work out the area of a circle you need to square the radius and then multiply by pi.
This can be written as r * r * 3.14

make the following changes –

– Using the variable “radius”, calculate the area of a circle by replacing the ????.
– Add some text at the top of the screen which says the area.

radius = int(input("Enter the radius circle -"))
area = ???? * ????? * 3.14


You need to log in or create an account to submit code!

Comments are closed.

Information