""" 1.打印 9 * 9 乘法表: 使用while循环和for循环 1 * 1 = 1 2 * 1 = 2 2 * 2 = 4 3 * 1 = 3 3 * 2 = 6 ... ............................... 9 * 1 = 9 9 * 2 = 18 ... 9 * 9 = 81 选做: 使用while单层循环完成 """ for i in range(1, 10): j = 0 while j < i: j += 1 print(f"{i}*{j}={i*j}", end=" ") print() i = 1 while i <= 9: j = 1 while(j <= i): print(f"{i}*{j}={i*j}", end=" ") j += 1 print("") i += 1