while循环的应用
1.打印正方形#j代表行,i代表列j = 1while j <= 5 : i = 1 while i <= 5: print('*' , end = '') #把end默认的换行取消 i = i + 1 print() j = j + 1演示:2.打印三角形#j代表行,i代表列j = 1while j <= 5 : i = 1 while i <= j:#行数和列