Python 3基础教程7-if语句
2017-05-05 22:09
375 查看
前面文章介绍的循环语句,这里开始介绍控制语句。直接看下面的demo.py例子
# 这里介绍 if语句
x = 5
y = 8
z = 4
s = 5
if x < y:
print('x is less than y')
if x < y > z:
print('x is less than y and greater than z')
if x <= s:
print('x is less than or equal to s')
# 这里介绍 if语句
x = 5
y = 8
z = 4
s = 5
if x < y:
print('x is less than y')
if x < y > z:
print('x is less than y and greater than z')
if x <= s:
print('x is less than or equal to s')
相关文章推荐
- Python 3基础教程8-if else语句
- Python 3基础教程8-if elif else语句
- Python学习入门基础教程(learning Python)--3.2 if-else分支语句 .
- Python入门教程之if语句的用法
- Python学习入门基础教程(learning Python)--3.3.4 Python的if-elif-else语句
- Python3.2官方文档教程-流程控制语句(if,for,pass)
- python教程1-4 控制流语句: If
- Python 3基础教程5-while循环语句
- Python学习入门基础教程(learning Python)--3.1Python的if分支语句
- Python入门教程之if语句的用法
- Python 3基础教程6-for循环语句
- Python 3基础教程2-打印语句和字符串
- 2.8 python中的if...elif...else语句 [python入门教程]
- Python学习入门基础教程(learning Python)--3.1Python的if分支语句 .
- Python学习入门基础教程(learning Python)--3.2 if-else分支语句
- python教程13--《控制语句之 if、while、for》
- Python中如何避免使用多个分支语句(多个if和else)——函数字典(Function Map)简介
- Python系列教程 if, while, for控制流
- Python学习--控制语句:if, while, for, break, continue
- 【无限互联】iOS开发视频教程— 2.6 iPhone开发之if条件和for循环语句