0

Module - calculating circle perimeter and area

Can someone see why I keep getting errors on my code?

11th Oct 2020, 6:48 PM
Greezy gree
Greezy gree - avatar
2 Antworten
+ 5
You have to return the variable instead of return do return perim And return area
11th Oct 2020, 6:57 PM
Ruba Kh
Ruba Kh - avatar
- 1
from math import pi radius = int(input()) def perim(): perim = 2 * pi * radius return def area(): area = pi * radius * radius return print("Perimeter:", round(perim(), 2)) print("Area:", round(area(), 2))
11th Oct 2020, 6:49 PM
Greezy gree
Greezy gree - avatar