diff --git a/13.py b/13.py index 4a164d5..4b77822 100644 --- a/13.py +++ b/13.py @@ -1,5 +1,14 @@ -hero=['猴三',10,'猴一',21,'猴五',22,'猴队长',29,'猴七',30] - +hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30} +print(hero['猴队长']) hero['猴七']=32 print(hero) +hero['猴十']=25 +print(hero) + + + + + + + diff --git a/jkd.py b/jkd.py new file mode 100644 index 0000000..43c67ae --- /dev/null +++ b/jkd.py @@ -0,0 +1,9 @@ +KFC={'汉堡':20,'可乐':8,'鸡翅':12.5,'薯条':9.9,'蛋挞':8,'全鸡':43,'瑞幸':12,} +y=input("你想要吃什么呀") + +if y in KFC: + print("你好,你的"+y+"需要"+str(KFC[y])+"元") + +else: + print("抱歉,没有您想要的商品,请重新选购") + \ No newline at end of file diff --git "a/\345\210\232\345\210\232\343\200\202.py" "b/\345\210\232\345\210\232\343\200\202.py" new file mode 100644 index 0000000..8adc7f4 --- /dev/null +++ "b/\345\210\232\345\210\232\343\200\202.py" @@ -0,0 +1,6 @@ +city ==['纽约','华盛顿','桃源岛','洛杉矶','芝加哥',旧金山] +raise=input('你想去哪里啊?') +if raise in city: + print('可以乘坐飞机通往'+raise) +else: + print('没有'+raise+'这座城市')