Discuss / Python / 20180205函数-计算面积作业。顺便立一个开始看的flag:2018.1.30开始学习python

20180205函数-计算面积作业。顺便立一个开始看的flag:2018.1.30开始学习python

Topic source

emilyhyj

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

-- coding: utf-8 --

def area_of_circle(x): #定义函数 s=3.14(x*2) print ('%.4f'%s) return s L=[12.34,9.08,73.1] #list 存储半径值 a=int(len(L)) t=a while a>0: area_of_circle(L[t-a])#调用函数 a=a-1

emilyhyj

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

s=3.14(x*2) 这里x后面是两个 号 不知道为什么有个* 没显示出来


  • 1

Reply