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
fda4e6f6
authored
Mar 02, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b3ec87ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
dlud
gggg.py
quiz.py
dlud
0 → 100644
View file @
fda4e6f6
gggg.py
0 → 100644
View file @
fda4e6f6
dict
=
{
'可口可乐'
:
1
,
'农夫山贼'
:
9000000
,
'草泥马'
:
1
,
'辣鸡'
:
1
}
k
=
input
(
'你买啥?'
)
if
k
in
dict
:
print
(
'丁冬~您的'
+
k
+
'需要支付'
+
str
(
dick
[
k
])
+
'元~'
)
else
:
print
(
'没有,滚'
)
\ No newline at end of file
quiz.py
View file @
fda4e6f6
list_hero
=
[
'173'
,
3000
,
'油病'
,
3700
,
'鸡'
,
90000
]
#
list_hero=['173',3000,'油病',3700,'鸡',90000]
dict_hero
=
{
'得到'
:
3000
,
'油病'
:
3700
,
'鸡'
:
90000
}
dict_hero
=
{
'得到'
:
3000
,
'油病'
:
3700
,
'鸡'
:
90000
}
print
(
len
(
list_hero
))
#print(len(list_hero))
print
(
len
(
dict_hero
))
#print(len(dict_hero))
\ No newline at end of file
print
(
dict_hero
)
print
(
dict_hero
[
'油病'
])
dict_hero
[
'鸡'
]
=
320
print
(
dict_hero
)
\ 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