python的一些内置函数
sum orange等等
while
i = 1
count = 0
while i <= 5:
print('*'*i)# * 为python独有的,其他的语言没有
i += 1
j = 1
while j <= 5:
count = 1
while count <= j:
print('*',end='')# 此处表示不换行
count += 1
print()
j += 1
一些while的基本的应用
i = 1
count = 0
while i <= 5:
print('*'*i)# * 为python独有的,其他的语言没有
i += 1
j = 1
while j <= 5:
count = 1
while count <= j:
print('*',end='')
count += 1
print()
j += 1
#打印乘法表
i = 1
while i <= 9:
count = 1
while count <= i:
sum_01 = count * i
print('{} * {} = {} '.format(count , i , sum_01),end='')
#.format为特别的占用符
count += 1
print()
i += 1