Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
basic-homework-mervin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mervin
basic-homework-mervin
Commits
75b4b7f3
Commit
75b4b7f3
authored
Jan 12, 2019
by
mervin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正则
parent
db2cb3ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
2.2-homework-mervin.py
+53
-0
No files found.
2.2-homework-mervin.py
0 → 100644
View file @
75b4b7f3
import
re
question1
=
(
input
(
""
))
#提问
if
"贪心"
and
"做什么"
in
question1
:
print
(
"贪心学院是一家高端重视售后服务的在线教育培训机构。"
)
elif
"贪心学院"
and
"做什么"
in
question1
:
print
(
"贪心学院是一家高端重视售后服务的在线教育培训机构。"
)
elif
"贪心"
and
"课程"
and
"方式"
in
question1
:
print
(
"项目式培训"
)
elif
"贪心学院"
and
"课程"
and
"方式"
in
question1
:
print
(
"项目式培训"
)
elif
"项目式"
in
question1
:
print
(
"贪心学院的项目式培训结合了西方项目式培训的优点和国内的现状,最终变化成以训练营的方式进行。做项目为主,老师负责解决部分知识的问题,学生负责自学部分知识,和不停的做项目,把知识巩固。在项目练习中,不仅仅学习到了知识,同时也培养起来良好的学习习惯和解决问题的能力。"
)
elif
"强"
in
question1
:
print
(
"贪心学院"
)
elif
"Python"
and
"课程"
and
"学习"
in
question1
:
print
(
"无编程基础,并且想学习编程的同学。"
)
elif
"Python"
and
"人群"
in
question1
:
print
(
"人群包含很广泛。
\n
第一:非IT圈内人群,想通过学习转行到编程领域中。
\n
第二:已经是IT圈内的,其他语言的开发人员,想学习Python编程。
\n
第三:已经是IT圈内的,但是并不是开发人员,如产品、测试、运维、DBA等岗位。
\n
第四:学生,未来想从事编程的工作。
\n
第五:未来想从事AI领域工作的,可先通过这门课程的学习项目,打下良好的基础。"
)
elif
"优势"
in
question1
:
print
(
"强大的服务体系,我们拥有每天跟学员沟通的良好服务机制。不放弃任何一个学员,只要来了,就一定要让你学会。"
)
elif
"数字"
in
question1
:
print
(
len
(
re
.
findall
(
"
\
d"
,
question1
)),
"个"
)
elif
"手机号"
in
question1
:
print
(
re
.
findall
(
"[1][3-9][0-9]{9}"
,
question1
))
elif
"ip"
in
question1
:
#试过答疑和网上的方法,没有成功匹配,望老师指导!
print
(
re
.
findall
(
"(([01]{0,1}
\
d{0,1}
\
d)|(2[0-4]
\
d)|(25[0-5])
\
.){3}(([01]{0,1}
\
d{0,1}
\
d)|(2[0-4]
\
d)|(25[0-5]))"
,
question1
))
elif
"拜拜"
or
"再见"
or
"bye"
in
question1
:
print
(
"再见"
)
else
:
print
(
""
)
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