Commit 02db8da3 by BellCodeEditor

auto save

parent 98f24605
Showing with 28 additions and 13 deletions
dict={'888点券':90,'ipad':2000000000,'苹果':40,'银行':9000000000,'可口可乐':45,'乐事':9,'农失山泉':2,'大白免':1,'粤利粤':6,'雷碧':3,'喜之娘':15,'啊萨姆':4}
k=input('What would you buy?')
if k in dict:
print('Good~your'+k+'must cost'+str(dict[k])+'yuan~')
else:
print('Sorry,it is not in.Please waite some times~')
\ No newline at end of file
cost={'apple':3.14,'pear':6.28,'peach':9.42,'coke':12.56,'fish':15.7,'candy':18.84}
k=input('Please print fruit name:')
v=input('Please print fruit')
if k in cost:
if float(v)<cost[k]:
cost[k]=float(v)
print(k+'jjl,xj'+v+'y')
else:
print(k+'zzl,usnobuy')
else:
cost[k]=float(v)
print(k+'djq'+v+'yysc')
\ No newline at end of file
# 这是悟空为花果山小猴做臂力测试的程序代码 dict_wc={'a':9,'b':25,'c':15,'d':45,'e':12}
name=input('你叫啥名啊?') print(dict_wc)
power=int(input('你臂力多少啊?')) print(dict_wc['d'])
list_hero=['猴三',10,'猴一',21,'猴五',22,'猴队长',29,'猴七',30] dict_wc['a']=250
for i in range(len(list_hero)): print(dict_wc)
if i%2==1 and list_hero[i]>=power: dict_wc['s']=518
list_hero.insert(i-1,name) print(dict_wc)
list_hero.insert(i,power) \ No newline at end of file
break
print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero=
print(dict_hero)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment