突然想学Python了,今天开始学习,编出了我的第一个Python程序
#calculate the area and circumference of a circle from its radius
import math
radiusString =input("Enter the radius of your circle:")
radiusInteger =int(radiusString)
circumference=2*math.pi*radiusInteger
area=math.pi*(radiusInteger**2)
print ("The cirumference is:%.2f,and the area is:%.2f"%(circumference,area))
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)