這就是我所擁有的。我需要打印的面積Python:計算圓柱體的表面積
def compute_surface_area_cylindar(radius, height):
surface_area = 2 * math.pi * r * h + 2 * math.pi * math.pow(r, 2)
return surface_area
radius = input("Radius of circle:")
radius = int(radius)
r = radius
height = input("Height of the cylinder:")
height = int(height)
h = height
很少有評論1)修正你的函數的縮進,這是Python,縮進問題2)你在哪裏調用你的函數來計算表面積? – paisanco
請添加更具體的問題。你有什麼嘗試?什麼是工作,什麼不是? –
打印功能不能正常工作...我有: –