Commit 03ff1475 by BellCodeEditor

save project

parent 731523f3
Showing with 30 additions and 14 deletions
city = ['纽约','华盛顿','桃源岛','洛杉矶','芝加哥','旧金山']
i = input('你想去哪里呀?')
if i in city:
print('可以乘坐飞机通往'+i)
else:
print('没有'+i+'这座城市')
\ No newline at end of file
score = {'语文':91,'数学':88,'英语':85}
for i in score:
print(i)
\ No newline at end of file
from turtle import *
color('red','red')
begin_fill()
for i in range(6):
forward(100)
left(60)
end_fill()
hideturtle()
done()
\ No newline at end of file
......@@ -3,13 +3,16 @@ st2 = {'语文':97,'数学':98,'英语':90}
st3 = {'语文':95,'数学':100,'英语':93}
score = {'悟空':st1,'诺依':st2,'小贝':st3}
n = input('名字:')
print('*' * 15)
if n in score:
score = score[n]
for k,v in score.items():
print(k,v)
while True:
print('请输入要查询的名字,退出请输入q')
n = input('名字:')
print('*' * 15)
else:
print('查询失败,请输入正确的名字.')
\ No newline at end of file
if n in score:
score = score[n]
for k,v in score.items():
print(k,v)
print('*' * 15)
elif n == 'q':
break
else:
print('查询失败,请输入正确的名字.')
\ 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