Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-3
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
9ebfe8f1
authored
Jan 02, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
4a169385
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
quiz.py
quiz.py
View file @
9ebfe8f1
西游
=
{
"唐僧"
:
"唐三藏"
}
西游
[
'大师兄'
]
=
"孙悟空"
西游
[
'二师兄'
]
=
"猪八戒"
西游
[
'三师弟'
]
=
"沙和尚"
print
(
西游
)
if
'唐僧'
in
西游:
print
(
西游
[
'唐僧'
])
\ No newline at end of file
BHSMJ
=
{
'笔记本'
:
5
,
'橡皮'
:
1
,
'铅笔'
:
2
,
'文具盒'
:
5
}
j
=
input
(
"你想要买什么物品?"
)
if
j
in
BHSMJ
:
print
(
'叮咚,您想要买的商品'
+
'j'
+
'需要支付'
+
str
(
BHSMJ
[
j
])
+
'元'
)
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