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

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
猜你喜欢
  • 2022-01-07
  • 2022-12-23
  • 2021-06-16
  • 2021-10-20
  • 2021-09-23
  • 2021-12-16
  • 2021-12-01
相关资源
相似解决方案