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
fba3ad2d
authored
Jul 13, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
7fb0ff1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
diy1.py
diy1.py
View file @
fba3ad2d
# 这是悟空为花果山小猴做臂力测试的程序代码
dict
=
{
"牛奶"
:
880
,
"乐事"
:
430
,
"雷碧"
:
679
,
"康帅傅脑残酸菜牛肉面"
:
1986
}
k
=
input
(
"sb,你想要啥"
)
k
=
input
(
"输入名称"
)
v
=
input
(
"输入钱数"
)
if
k
in
dict
:
print
(
"焯你的"
+
k
+
"需要"
+
str
(
dict
[
k
])
+
"元"
)
if
float
(
v
)
<
dict
[
k
]:
dict
[
k
]
=
float
(
v
)
print
(
"降价了,现在的价格是"
+
v
+
"元"
)
else
:
print
(
k
+
"涨价了,不卖了"
)
else
:
print
(
"焯,没的,滚"
)
dict
[
k
]
=
float
(
v
)
print
(
k
+
"价钱不变"
+
v
+
"元"
)
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