Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_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
a9f14b5e
authored
Mar 27, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b5758fba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
1.py
store.py
1.py
0 → 100644
View file @
a9f14b5e
score
=
{
'可口可乐人'
:
63
,
'旺仔牛奶人'
:
54
,
'农夫山泉人'
:
19
,
'辣条人'
:
93
,
'巴西烤肉人'
:
72
,
'果冻人'
:
94
,
'乐事人'
:
100
,
'奥利奥人'
:
14
,
'巧克力人'
:
6
}
k
=
input
(
'请输入你的名字:'
)
v
=
input
(
'请输入你的成绩:'
)
if
k
in
score
:
if
int
(
v
)
>
score
[
k
]:
score
[
k
]
=
int
(
v
)
print
(
'亲爱的'
+
k
+
'同学,恭喜你~成绩已更新为'
+
int
[
v
]
+
'分!'
)
else
:
print
(
'亲爱的'
+
k
+
'同学,遗憾的告诉你,成绩未被刷新。'
)
else
:
score
[
k
]
=
int
(
v
)
print
(
'亲爱的傻逼,您的第一次成绩'
+
v
+
'分'
)
store.py
View file @
a9f14b5e
goods
=
{
'可口可乐'
:
3
,
'旺仔牛奶'
:
4
,
'农夫山泉'
:
1
,
'辣条'
:
3
,
'巴西烤肉'
:
2
,
'果冻'
:
4
,
'乐事'
:
5
,
'奥利奥'
:
10
,
'巧克力'
:
6
}
goods
.
pop
(
"农夫山泉"
)
print
(
good
)
# 请将"农夫山泉"删掉,并打印出新的商品信息
k
=
input
(
"叮~你想买啥子"
)
if
k
in
goods
:
print
(
'叮咚~您的'
+
k
+
'需要支付'
+
str
(
goods
[
k
])
+
'元'
)
else
:
print
(
"你放屁,你真是一个sb,这有吗?"
)
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