Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
03ff1475
authored
Jan 18, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
731523f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
14 deletions
0.py
1.py
store.py
0.py
0 → 100644
View file @
03ff1475
city
=
[
'纽约'
,
'华盛顿'
,
'桃源岛'
,
'洛杉矶'
,
'芝加哥'
,
'旧金山'
]
i
=
input
(
'你想去哪里呀?'
)
if
i
in
city
:
print
(
'可以乘坐飞机通往'
+
i
)
else
:
print
(
'没有'
+
i
+
'这座城市'
)
\ No newline at end of file
1.py
View file @
03ff1475
score
=
{
'语文'
:
91
,
'数学'
:
88
,
'英语'
:
85
}
from
turtle
import
*
for
i
in
score
:
color
(
'red'
,
'red'
)
print
(
i
)
begin_fill
()
\ No newline at end of file
for
i
in
range
(
6
):
forward
(
100
)
left
(
60
)
end_fill
()
hideturtle
()
done
()
\ No newline at end of file
store.py
View file @
03ff1475
...
@@ -3,13 +3,16 @@ st2 = {'语文':97,'数学':98,'英语':90}
...
@@ -3,13 +3,16 @@ st2 = {'语文':97,'数学':98,'英语':90}
st3
=
{
'语文'
:
95
,
'数学'
:
100
,
'英语'
:
93
}
st3
=
{
'语文'
:
95
,
'数学'
:
100
,
'英语'
:
93
}
score
=
{
'悟空'
:
st1
,
'诺依'
:
st2
,
'小贝'
:
st3
}
score
=
{
'悟空'
:
st1
,
'诺依'
:
st2
,
'小贝'
:
st3
}
while
True
:
n
=
input
(
'名字:'
)
print
(
'请输入要查询的名字,退出请输入q'
)
print
(
'*'
*
15
)
n
=
input
(
'名字:'
)
if
n
in
score
:
score
=
score
[
n
]
for
k
,
v
in
score
.
items
():
print
(
k
,
v
)
print
(
'*'
*
15
)
print
(
'*'
*
15
)
else
:
if
n
in
score
:
print
(
'查询失败,请输入正确的名字.'
)
score
=
score
[
n
]
\ No newline at end of file
for
k
,
v
in
score
.
items
():
print
(
k
,
v
)
print
(
'*'
*
15
)
elif
n
==
'q'
:
break
else
:
print
(
'查询失败,请输入正确的名字.'
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment