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
73b3b24c
authored
Sep 28, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
e20bcbf1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletions
diy1.py
o.py
oo.py
diy1.py
View file @
73b3b24c
...
@@ -9,5 +9,11 @@ for i in range(len(list_hero)):
...
@@ -9,5 +9,11 @@ for i in range(len(list_hero)):
break
break
print
(
list_hero
)
print
(
list_hero
)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero
=
{
'猴三'
:
10
,
'猴一'
:
21
,
'猴五'
:
22
,
'猴队长'
:
29
,
'猴七'
:
30
}
dict_hero
=
{
'猴三'
:
10
,
'猴一'
:
21
,
'猴五'
:
22
,
'猴队长'
:
29
,
'猴七'
:
30
,
'sb'
:
50
}
dict_xiyou
=
{}
dict_xiyou
[
"师傅"
]
=
'唐三藏'
dict_xiyou
[
"大师兄"
]
=
'孙悟空'
dict_xiyou
[
"二师兄"
]
=
'猪八戒'
dict_xiyou
[
"三师兄"
]
=
'沙师弟'
print
(
dict_hero
)
print
(
dict_hero
)
print
(
dict_xiyou
)
o.py
0 → 100644
View file @
73b3b24c
s
=
{
'王子'
:
90
,
'王后'
:
95
,
'国王'
:
100
}
y
=
[
"王红"
,
"赵密"
,
"唐华"
]
g
=
input
(
"请输入您的姓名"
)
if
g
in
y
:
k
=
input
(
"请输入学生姓名:"
)
v
=
input
(
"请输入学生成绩:"
)
oo.py
0 → 100644
View file @
73b3b24c
dict
=
{
'可口可乐'
:
3
,
'旺仔牛奶'
:
4
,
'农夫山泉'
:
1
,
'辣条'
:
3
,
'巴西烤肉'
:
2
,
'果冻'
:
4
,
'乐事'
:
5
,
'奥利奥'
:
10
,
'巧克力'
:
6
}
k
=
input
(
'您想买什么呀?'
)
sum
=
10
s
=
input
(
"您想要多少?"
)
if
k
in
dict
:
if
(
sum
-
int
(
s
))
>
0
:
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