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
c74ef512
authored
Apr 04, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
2533742b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
2.py
3.py
2.py
0 → 100644
View file @
c74ef512
score
=
{
'语文'
:
91
,
'数学'
:
88
,
'英语'
:
85
}
for
k
,
v
in
score
.
items
():
print
(
k
,
v
)
\ No newline at end of file
3.py
0 → 100644
View file @
c74ef512
student1
=
{
"语文"
:
90
,
"数学"
:
79
,
"英语"
:
100
}
student2
=
{
"语文"
:
60
,
"数学"
:
90
,
"英语"
:
108
}
student3
=
{
"语文"
:
40
,
"数学"
:
78
,
"英语"
:
80
}
chengji
=
{
"悟空"
:
student1
,
"小贝"
:
student2
,
"赵毅"
:
student3
}
while
True
:
name
=
input
(
"请输入你的名字:"
)
print
(
"如要查的名字,推出输入q"
)
print
(
"*"
*
30
)
if
name
in
chengji
:
info
=
chengji
[
name
]
for
k
,
v
in
info
.
items
():
print
(
k
,
v
)
print
(
"*"
*
30
)
elif
name
==
"q"
:
break
else
:
print
(
"请输入正确的名字:"
)
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