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
57e1e08c
authored
9 months ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
15308f38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
diy3.py
diy3.py
View file @
57e1e08c
s
=
{
"语文"
:
90
,
"数学"
:
91
,
"英语"
:
99
,
"科学"
:
92
,
"体育"
:
10
}
s2
=
{
"语文"
:
92
,
"数学"
:
89
,
"英语"
:
89
,
"科学"
:
95
,
"体育"
:
80
}
s3
=
{
"语文"
:
95
,
"数学"
:
97
,
"英语"
:
94
,
"科学"
:
97
,
"体育"
:
90
}
name
=
{
"孙凯瑞"
:
s
,
"小明"
:
s2
,
"小红"
:
s3
}
while
True
:
c
=
input
(
"请输入名字"
)
d
=
name
[
c
]
if
c
in
name
:
for
k
,
v
in
d
.
items
():
print
(
k
,
v
)
else
:
print
(
"名字错了"
)
continue
with
open
(
r'C:\Users\14663\Desktop\1.txt'
,
'w'
,
encoding
=
"utf-8"
)
as
file1
:
file1
.
write
(
"孙凯瑞"
)
This diff is collapsed.
Click to expand it.
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