Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_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
f163aee0
authored
Mar 12, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
59df505a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
demo1.py
demo1.py
0 → 100644
View file @
f163aee0
# 创建让用户输入年龄,如果大于18岁,可以喝酒。小于18岁 ,
#不能喝酒 输入了拼音 控制台输出,请输入数字
try
:
a
=
int
(
input
(
"输入年龄"
))
except
:
print
(
"请输入数字"
)
else
:
if
a
<
18
:
print
(
"不可以喝酒"
)
else
:
print
(
"可以喝酒"
)
print
(
"hahaha"
)
\ 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