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
5af374d6
authored
May 01, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
aea3fe24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
tyfdsb
tyfdsb.py
tyfdsb
0 → 100644
View file @
5af374d6
tyfdsb.py
0 → 100644
View file @
5af374d6
price
=
{
'苹果'
:
3
,
'榴莲'
:
70
,
'山竹'
:
10
,
'桃子'
:
3
,
'草莓'
:
8
,
'屎'
:
1000
}
k
=
input
(
"你要买什么?"
)
v
=
input
(
"今日水果多少钱?"
)
if
k
in
price
:
if
int
(
v
)
>
price
[
k
]:
price
[
k
]
=
int
(
v
)
print
(
'你买的水果涨价了'
)
else
:
print
(
'今天的水果没涨价'
)
else
:
price
[
k
]
=
int
(
v
)
print
(
'今日'
+
k
+
'价格为'
+
v
+
'元'
)
\ 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