Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-2
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
03a104c4
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
05e48008
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
quiz.py
quiz.py
View file @
03a104c4
# 直接运行以下代码,说说你的发现:
# 直接运行以下代码,说说你的发现:
dict_hero
=
{
'赵一'
:
30
,
'丁二'
:
37
,
'孙五'
:
52
,
'王猛'
:
89
,
'周亮'
:
98
}
dict_hero
=
{
'可乐'
:
30
,
'薯片'
:
37
,
'奥利给'
:
52
,
'卫生纸'
:
89
}
dict_hero
[
'赵一'
]
=
10
t
=
input
(
"你要啥"
)
print
(
dict_hero
)
if
t
in
dict_hero
:
print
(
'你需要的'
+
t
+
str
(
dict_hero
[
t
])
+
'元'
)
else
:
print
(
"没有,你可以滚了"
)
This diff is collapsed.
Click to expand it.
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