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
4fbd2640
authored
May 30, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
a75aa89f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
diy.py
diy2.py
diy.py
View file @
4fbd2640
score
=
{
"小明"
:
80
,
"小红"
:
90
}
scrore
=
{
'小明'
:
77
,
'老八'
:
88
,
'梁志超'
:
91
,
'玛卡巴卡'
:
100
}
name
=
input
(
"名字:"
)
k
=
input
(
"你*******,快输你姓名"
)
s
=
input
(
"成绩:"
)
v
=
input
(
"你*******,你多少分"
)
if
name
in
score
:
if
k
in
scrore
:
if
int
(
v
)
>
scror
[
k
]:
elif
int
(
s
)
>
score
[
name
]:
scrore
[
k
]
=
int
(
v
)
score
[
name
]
=
int
(
s
)
print
(
"*******+'k'你***的成绩已更新,艹,下次不给你更新了!!!!!!!"
)
else
:
print
(
'***,你活该比上次分低不给你更新了")
else:
else:
score
[
name
]
=
int
(
s
)
print('
***
,
你进来了
")
print
(
score
)
\ No newline at end of file
\ No newline at end of file
diy2.py
View file @
4fbd2640
...
@@ -4,6 +4,7 @@ s=input("成绩:")
...
@@ -4,6 +4,7 @@ s=input("成绩:")
if
name
in
score
:
if
name
in
score
:
if
int
(
s
)
>
score
[
name
]:
if
int
(
s
)
>
score
[
name
]:
score
[
name
]
=
int
(
s
)
score
[
name
]
=
int
(
s
)
else
:
else
:
score
[
name
]
=
int
(
s
)
score
[
name
]
=
int
(
s
)
print
(
score
)
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