Commit 40280b2b by BellCodeEditor

auto save

parent f3fb05e6
Showing with 19 additions and 6 deletions
dict={"我":1,"你":2,"他":3}
print(dict["我"])
dict["我"]=11
dict["z"]=12
if z in dict:
dict={"小明":30,"小李":60,"小美":100}
k=input("您的姓名是什么")
j=input("您的最新成绩是什么")
if k in dict:
if int(j)>dict[k]:
print("您的成绩已刷新")
else:
print("您的成绩未刷新")
else:
dict[k]=v
print(dict)
print("您的第一次成绩已刷新")
dict={"农夫山泉":2,"旺仔牛奶":3,"可口可乐":3,"巧克力":3,"乐事":4,"奥利奥":5,"巴西烤肉":5}
k=input("你想买什么?")
j=input("你想买的数量是什么?")
if k in dict:
print("你的"+k+"需要"+str(dict[k])*str(dict[j])+"元")
else:
print("没有货")
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