Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-4
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
0d0f2137
authored
Mar 09, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5f2ee3f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
Untitled-1.py.py
diy.py
ff.py
tyh.py
Untitled-1.py.py
0 → 100644
View file @
0d0f2137
dict
=
{
'北京烤日本'
:
900
,
'巴西辣条'
:
10
,
'印度焗蜗牛'
:
20
,
'193年拉菲'
:
9999
,
'铁板作业'
:
25
,
'油炸试卷'
:
10
,
'红烧教室'
:
80
,
'铁锅炖小贝'
:
90
,
'农夫山贼'
:
5
,
'忘仔糖'
:
90
,
'甜条'
:
20
}
k
=
input
(
"你想买什么"
)
if
k
in
dict
:
print
(
'你的'
+
k
+
'需要支付'
+
str
(
dict
[
k
])
+
'元'
)
else
print
(
'你的'
+
k
+
'没有卖的,赶紧走开'
)
\ No newline at end of file
diy.py
View file @
0d0f2137
dict
=
{
'北京烤日本'
:
900
,
'巴西辣条'
:
10
,
'印度焗蜗牛'
:
20
,
'10000年拉菲'
:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
,
'铁板作业'
:
25
,
'油炸试卷'
:
10
,
'红烧教室'
:
80
,
'铁锅炖小贝'
:
90
,
'农夫山贼'
:
5
,
'忘仔糖'
:
90
,
'甜条'
:
20
}
dict
=
{
'日本牌和污水'
:
900
,
'日本炒核弹'
:
10
,
'日本之墓'
:
20
,
'10000年拉菲'
:
999999
,
'铁板作业'
:
25
,
'油炸试卷'
:
10
,
'红烧教室'
:
80
,
'铁锅炖小贝'
:
90
,
'肉泥bag军'
:
5
,
'理鱼炖诺依'
:
90
,
'乱锅炖悟空'
:
20
}
k
=
input
(
"你想买什么"
)
if
k
in
dict
:
print
'你的'
+
k
+
'需要支付'
+
str
(
dict
[
k
])
+
'欧元'
(
)
print
(
'你的'
+
k
+
'需要支付'
+
str
(
dict
[
k
])
+
'美元'
)
else
:
print
(
'你的'
+
k
+
'没有卖的,赶紧走开'
)
\ No newline at end of file
ff.py
0 → 100644
View file @
0d0f2137
o
=
{
"哦"
:
10
,
"哦哦"
:
20
,
"哦哦哦"
:
30
}
print
(
o
)
print
(
o
[
'哦哦哦'
])
o
[
"哦哦哦哦"
]
=
40
print
(
o
)
tyh.py
View file @
0d0f2137
hero
=
{
'猴一'
:
31
,
'猴二'
:
31
,
'猴
三'
:
25
,
'猴队长'
:
34
}
print
(
hero
)
三
':25,'
猴队长
':34}
print(hero
print(hero['
猴一
'])
hero['
猴三
']=30
print(hero)
...
...
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