Discuss / Python / 可行

可行

Topic source

Ashen One

#1 Created at ... [Delete] [Delete and Lock User]

import math

def circle_area(radius):

    if  radius > 0:  

        print('该圆的面积为:', math.pi*radius**2)

    else:

        print('请输入正确的半径')

radius = float(input('请输入圆的半径:'))  

circle_area(radius)


  • 1

Reply