我的第一个Python程序

xiaoxiao2021-02-28  140

突然想学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))

转载请注明原文地址: https://www.6miu.com/read-48826.html

最新回复(0)