Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson10-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
936709fb
authored
Sep 05, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
16db9fa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
444.py
5.py
444.py
0 → 100644
View file @
936709fb
# 原代码:
city
=
[
'纽约'
,
'华盛顿'
,
'桃源岛'
,
'洛杉矶'
,
'芝加哥'
,
'旧金山'
]
r
=
input
(
'你想去哪里啊?'
)
if
r
in
city
:
print
(
'可以乘坐飞机通往'
+
r
)
else
:
print
(
'没有'
+
r
+
'这座城市'
)
5.py
View file @
936709fb
def
data
():
today_menu
=
{
'前菜'
:{
'熏鲢鱼'
:
20
,
'生蚝'
:
20
,
'面包'
:
10
},
total
=
[]
'汤'
:{
'玉米浓汤'
:
15
,
'蔬菜汤'
:
15
,
'海鲜汤'
:
15
},
while
True
:
'主菜'
:{
'鱼'
:
40
,
'虾'
:
30
,
'蟹'
:
20
,
'贝壳类'
:
20
},
a
=
input
()
'间菜'
:{
'牛扒'
:
25
,
'煨菜'
:
25
,
'肉排'
:
30
},
try
:
"烧烤和沙拉"
:{
'需要'
:
15
,
'不需要'
:
0
},
a
=
int
(
a
)
'甜品'
:{
'可丽露'
:
20
,
'优格吐司'
:
15
,
'蓝莓松饼'
:
20
}
except
:
}
if
a
==
'q'
:
break
for
k
,
v
in
today_menu
.
items
():
else
:
print
(
'今日'
+
k
+
'有:'
)
print
(
"输入整数"
)
for
i
in
v
:
else
:
print
(
i
,
end
=
' '
)
#依次告诉客人今天的各类菜有哪些选择
total
.
append
(
a
)
print
()
print
(
total
)
\ No newline at end of file
data
()
\ 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