Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_4
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
40c28010
authored
Dec 02, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
48cb971d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
1.py
1.py
View file @
40c28010
s1
=
{
'c'
:
110
,
'm'
:
110
,
'e'
:
110
}
s2
=
{
'c'
:
105.5
,
'm'
:
107
,
'e'
:
106.5
}
s3
=
{
'c'
:
103
,
'm'
:
105
,
'e'
:
108
}
score
=
{
'Lucas'
:
s1
,
'tom'
:
s2
,
'Sam'
:
s3
}
while
True
:
print
(
"请输入查询名字,退出输入q"
)
name
=
input
(
"名字:"
)
print
(
"*"
*
30
)
if
name
in
score
:
score
=
score
[
name
]
for
k
,
v
in
score
.
items
():
print
(
k
,
v
)
print
(
"*"
*
30
)
elif
name
==
"q"
:
break
else
:
print
(
"查询错误,请重新输入"
)
print
(
"*"
*
30
)
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