Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-5_DIY1
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
d4904277
authored
Mar 13, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ae893bbd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
爱心.py/第三题.py
爱心.py/第四题.py
菜单.py
爱心.py/第三题.py
View file @
d4904277
a
=
[]
a
=
[]
...
...
@@ -5,4 +5,4 @@ while True:
break
else
:
a
.
append
(
b
)
print
(
a
)
\ No newline at end of file
print
(
a
)
\ No newline at end of file
爱心.py/第四题.py
View file @
d4904277
-- "a/\347\210\261\345\277\203.py/\347\254\254\345\233\233\351\242\230.py"
try
:
try
:
age
=
int
(
input
(
'你今年几岁了?'
))
except
:
print
(
'要输入整数啊'
)
else
:
if
age
<
18
:
print
(
'不可以喝酒嗷'
)
print
(
'程序结束~~'
)
\ No newline at end of file
菜单.py
View file @
d4904277
a
=
[]
a
=
[]
a
=
[]
while
True
:
b
=
input
(
"请输入菜的价格:"
)
if
b
==
'q'
:
break
try
:
b
=
input
(
"请输入菜品价格:"
)
if
b
==
'q'
:
break
b
=
int
(
b
)
except
:
print
(
"请输入数字:"
)
else
:
a
.
append
(
b
)
print
(
a
)
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