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
8e9b1606
authored
May 25, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
6c221d40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
0.py
0.py
View file @
8e9b1606
cg
=
{
'小明'
:
66
,
'小刚'
:
50
,
'小美'
:
96
,
'小李'
:
73
,}
cg
=
{
'小明'
:
66
,
'小刚'
:
50
,
'小美'
:
96
,
'小李'
:
73
,}
k
=
(
'输入你的姓名:'
)
k
=
input
(
'输入你的姓名:'
)
x
=
(
'输入你的成绩:'
)
x
=
input
(
'输入你的成绩:'
)
if
k
in
cg
:
if
k
in
cg
:
if
int
(
x
)
<
cg
[
k
]:
if
int
(
x
)
<
cg
[
k
]:
cg
[
k
]
=
int
(
x
)
cg
[
k
]
=
int
(
x
)
print
(
k
+
'成绩是'
+
x
)
print
(
k
+
'成绩是'
+
x
)
else
:
print
(
k
+
'成绩不变'
)
else
:
cg
[
k
]
=
int
(
x
)
print
(
k
+
'成绩上升'
)
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