Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-5
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
a3a85e15
authored
Jun 25, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
3ba69be3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
a.py
a.py
View file @
a3a85e15
b
=
1
score
=
{
"小明"
:
77
,
"小王"
:
86
,
"小张"
:
58
,
"小美"
:
100
,
"小丽"
:
58
}
print
(
"输入空格退出"
)
while
True
:
a
=
input
(
"请输入你的姓名:"
)
b
=
input
(
"请输入你的最新成绩:"
)
if
b
==
" "
or
a
==
" "
:
break
if
a
in
score
:
if
int
(
b
)
>
score
[
a
]:
score
[
a
]
=
b
print
(
"成绩更新成功"
)
else
:
print
(
"成绩更新失败"
)
else
:
score
[
a
]
=
int
(
b
)
print
(
"第一次成绩录入成功"
)
print
(
score
)
\ 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