第四堂课学习

Python学习笔记4
## 输出倒三角形
line = 5
while line > 0
tem = line
while tem > 0
print("*",end="")
tem -= 1

print()
line -= 1

结果:
*****
****
***
**
*


##
first=9
while first>0
second=1
while second<=first
print(str(sec)+"*"+str(first)+"=",second*first,end=" ")
second+=1
print()
first-=1

##
first=9
while first>0
second=1
while second<=first
print(str(sec)+"*"+str(first)+"=",second*first,end=" ")
second+=1
print()
first-=1

##
first=1
while first<=9
second=1
while second<=first
print(str(sec)+"*"+str(first)+"="+str(second*first),end=" ")
second+=1
print()
first+=1

#比较运算符
< > >= <= == != #// 结果只有两种 False ture

#逻辑运算符
and not or

#赋值运算符
= -= += *= /= %= //= **=

#表达式与语句之间的区别?

#While
while 条件1:
语句
while 条件2:
语句

# break与continue 之间的区别

原文地址:https://www.cnblogs.com/Skypeduty1225/p/8350729.html