def cylinder():
r = int(input("Radius = "))
h = int(input("Height = "))
s = 2 * 3.14 * r * h
if input("Do you want to know full area? [y/n]: ") == "y":
s += 2 * circle(r)
print(s)
def circle(r):
s1 = 3.14*r*r
cylinder()
This is my code, and I have error:
File "C:\Users\Good dogie\Desktop\python-work\main.py", line 187, in <module>
cylinder()
File "C:\Users\Good dogie\Desktop\python-work\main.py", line 182, in cylinder
s += 2 * circle(r)
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
I understand what the error means, but I can't figure out how to fix this. If someone can give me a tip I'll be grateful.