Py while循环 九九乘法表
# py while 99乘法表
print("py while 99乘法表")
while int2 <= 9:
int3 = 1
while int3 <= int2:
print("\033[3m\033[90m%d * %d = %d\033[0m" % (int3, int2, int2 * int3), end='\t')
int3 += 1
int2 += 1
print("%s" % '')
Py for循环 九九乘法表
# py for 99乘法表
print("py for 99乘法表")
for int1 in range(1, 10):
for int2 in range(1, int1 + 1):
print("\033[3m\033[94m%d * %d = %d\033[0m" % (int2, int1, int2 * int1), end='\t')
print("%s" % '')