Commit 4c71b79f by BellCodeEditor

save project

parent 5fd9e1d3
Showing with 23 additions and 0 deletions
...@@ -17,3 +17,5 @@ dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30} ...@@ -17,3 +17,5 @@ dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
# print(dict_hero) # print(dict_hero)
if '猴队长' in dict_hero: if '猴队长' in dict_hero:
print(dict_hero) print(dict_hero)
else:
print()
h={"a":1,"b":2,"c":3,"d":4,"e":5,"f":6,"g":7,"h":8,"i":9,"j":10,"k":11,"l":12}
c=input("买什么?")
if c in h:
print(c+"为"+str(h[c])+"元")
else:
print("无货")
\ No newline at end of file
c={"p":5.2,"s":12.9,"x":2.4}
c={"p":5.2,"s":12.9,"x":2.4}
k=input("name:")
v=input("march:")
if k in c :
if float(v)<=c[k]:
c[k]=float(v)
print("a")
else:
print("b")
else:
c[k]=float(v)
print(k+v+" OK")
\ No newline at end of file
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