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
e5eed142
authored
Aug 24, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
37a31d62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
quiz.py
quiz.py
View file @
e5eed142
i
=
{
'q'
:
1
,
'W'
:
2
,
'e'
:
3
,
'r'
:
4
,
't'
:
5
,
'y'
:
6
}
q
=
{
'辣条'
:
3
,
'薯片'
:
6
,
'烤肠'
:
5
,
'鸡腿'
:
8
,
'卤蛋'
:
2
,
'橙汁'
:
9
,
'酸奶'
:
7
}
print
(
i
)
k
=
input
(
"请问您要买什么东西?"
)
v
=
input
(
"请输入物品价格"
)
print
(
i
[
'e'
])
if
k
in
q
:
if
int
(
v
)
<
q
[
k
]:
i
[
'e'
]
=
5
q
[
k
]
=
int
(
v
)
print
(
i
)
print
(
k
+
'降价了,现在'
+
v
+
'元'
)
\ No newline at end of file
else
:
print
(
k
+
'涨价了'
)
else
:
q
[
k
]
=
int
(
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