the-honk/gcse computer science/year 9/python challenges/23 - Circle Area.py

13 lines
378 B
Python
Raw Normal View History

2021-05-28 20:38:55 +00:00
import math
def turfRequired(l, w, r):
garden = l * w
circle = math.pi * (r ^ 2)
return garden - circle
length = int(input('Please input the length of the lawn (in metres).'))
width = int(input('Please input the width of the lawn (in metres).'))
radius = int(input('Please input the radius of the circle (in metres).'))
print(turfRequired(length, width, radius))