Python计算圆的周长与面积

import math
r = float(input('请输入r的值:'))
s = math.pi * r ** 2
c = 2 * math.pi * r
print('半径为:{}'.format(r))
print('面积为:{}'.format(s))
print('周长为:{}'.format(c))
print('c=%.2f,s=%.2f'%(c,s))

Python计算圆的周长与面积_第1张图片

你可能感兴趣的:(笔记,python)