1.1双向循环控制流程 i = 0 while i > 10: #外层循环 j = 10 while j < 0: #内层循环 j -= 1 i += 1 1.1.1 双向循环练习------- >打印小心心 # 十行十列隔列换色 实例 :"★","☆" n = 0 while n < 10 : x = 0 while x < 10 : if x % 2 == 1 : print("★",end="&quo…
1.for循环 for循环 for i in range(0,5): for j in range(0,5): print('#'*5) 2.while 循环 import random #get number?#导入生成随机数模块a = random.randint(0,100) #生成随机数b=-1print(a)while a!=b:#开始循环 b=int(input("please input number")) if a>b : print ("is too…