the-honk/gcse computer science/year 9/python challenges/23 - Circle Area.py
2021-09-14 21:57:23 +01:00

13 lines
No EOL
378 B
Python

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))