Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-1
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
b992b78d
authored
Oct 16, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
fd9f108d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
5.py
6.py
5.py
0 → 100644
View file @
b992b78d
s
=
{
'小张'
:
100
,
'锤锤'
:
0
}
k
=
input
(
"请输入你的姓名:"
)
v
=
input
(
"请输入你的分数:"
)
if
k
in
s
:
if
int
(
v
)
>
s
[
k
]:
s
[
k
]
=
int
(
v
)
print
(
K
+
'同学,恭喜你的成绩一刷新为'
+
v
+
"分"
)
else
:
print
(
"你的成绩没被更新"
)
else
:
s
[
k
]
=
int
(
v
)
print
(
K
+
'同学,恭喜你的第一次成绩'
+
v
+
"分"
)
\ No newline at end of file
6.py
0 → 100644
View file @
b992b78d
sp
=
{
'核弹'
:
444
,
'M416'
:
222
,
'氢弹'
:
99999999
,
'窝窝头'
:
99999999
,
'M416通用子弹'
:
321343
}
k
=
input
(
'你要买什么'
)
if
k
in
sp
:
print
(
'您的'
+
k
+
'需要'
+
str
(
sp
[
k
])
+
'兆'
)
else
:
print
(
'钱不够'
)
\ 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