|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
自我感觉良好
name = input('请输入待查询用户名:')
score=[['兔兔',85],['黑夜',80],['小布丁',65],['福禄娃娃',95],['怡景',90]]
ok = 0
for each in score:
# print (each[0])
if name==each[0]: #用(if name in each) 也是不错的~
print(name+'的得分是:',each[1])
ok =1
break
if not ok:
print ('查不到')
#动动手0
def my_min (*num):
mins =0
for i in num:
mins = mins if mins < i else i
return mins
print(my_min(1,2,3,4,5,6,7,8,-9,0))
#动动手1
def my_sum (*num):
_sum =0
for i in num:
if type(i)==str:
continue
_sum+=i
return _sum
print(my_sum(1,2,3,4,5,6,7,8,-9,0,'a')) |
评分
-
查看全部评分
|