2个回答
2019-11-26
展开全部
def area(r):
return r*r*3.14
print("%.2f %.2f" % (area(3.5),area(2.9)))
print("圆环面积:%.2f" % (area(6.2)-area(3.3)))
---------------------------------------------------------------
def avg(a,b,c):
return int((a+b+c)/3)
s={'小李':[77,54,57],'小张':[89,66,78],'小陈':[90,93,80],'小杨':[69,58,93]}
chengji={}
for i in s:
chengji[i]=avg(s[i][0],s[i][1],s[i][2])
print(chengji)
-------------------------------------------------------------------------------
def avg(lst):
return int(sum(lst)/len(lst))
chengji={}
s={'小李':[77,54],'小张':[89,66,78,99],'小陈':[90],'小杨':[69,58,93]}
for i in s:
chengji[i]=avg(s[i])
print(chengji)
return r*r*3.14
print("%.2f %.2f" % (area(3.5),area(2.9)))
print("圆环面积:%.2f" % (area(6.2)-area(3.3)))
---------------------------------------------------------------
def avg(a,b,c):
return int((a+b+c)/3)
s={'小李':[77,54,57],'小张':[89,66,78],'小陈':[90,93,80],'小杨':[69,58,93]}
chengji={}
for i in s:
chengji[i]=avg(s[i][0],s[i][1],s[i][2])
print(chengji)
-------------------------------------------------------------------------------
def avg(lst):
return int(sum(lst)/len(lst))
chengji={}
s={'小李':[77,54],'小张':[89,66,78,99],'小陈':[90],'小杨':[69,58,93]}
for i in s:
chengji[i]=avg(s[i])
print(chengji)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询