首页 > 编程语言 > 详细

Python 3基础教程7-if语句

时间:2019-03-29 19:14:43      阅读:145      评论:0      收藏:0      [点我收藏+]

前面文章介绍的循环语句,这里开始介绍控制语句。直接看下面的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‘)

Python 3基础教程7-if语句

原文:https://www.cnblogs.com/wangyinghao/p/10623209.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!