Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_3
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
9ce7a1e8
authored
Feb 11, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
330338e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
diy3.py
diy3.py
View file @
9ce7a1e8
...
@@ -5,11 +5,14 @@ student4 = {'语文':100, '数学':100 , '英语':100 }
...
@@ -5,11 +5,14 @@ student4 = {'语文':100, '数学':100 , '英语':100 }
score
=
{
'王梓硕'
:
student1
,
'谢坤辰'
:
student2
,
'丸子老师'
:
student3
,
'于潇然'
:
student4
}
score
=
{
'王梓硕'
:
student1
,
'谢坤辰'
:
student2
,
'丸子老师'
:
student3
,
'于潇然'
:
student4
}
# 查询并打印出输入的名字对应的所有科目的成绩
# 查询并打印出输入的名字对应的所有科目的成绩
while
True
:
while
True
:
print
(
"现在输入你这个败家子的名字吧!如果你TM要退出,输入s"
)
name
=
input
(
"你TM要查谁的成绩?"
)
name
=
input
(
"你TM要查谁的成绩?"
)
if
name
in
score
:
if
name
in
score
:
ji
=
score
[
name
]
ji
=
score
[
name
]
for
k
,
v
in
ji
.
items
():
for
k
,
v
in
ji
.
items
():
print
(
k
,
v
)
print
(
k
,
v
)
elif
name
==
"s"
:
break
else
:
else
:
print
(
"你TM有病吧,根本就没有这个人!!!你TM***************"
)
print
(
"你TM有病吧,根本就没有这个人!!!你TM***************"
)
...
...
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