1:打印处九九乘法表
# -*- coding: utf-8 -*- # @Time : 2021/7/22 0:34 # @Author : 魔王 # @FileName: 循环.py
i = 1 #行 while i <= 9: j =1 #列 内循环 while j <= i: print(f'{j} * {i} = {i*j}\t', end='') j+= 1 print('') i += 1
1:打印处九九乘法表
# -*- coding: utf-8 -*- # @Time : 2021/7/22 0:34 # @Author : 魔王 # @FileName: 循环.py
i = 1 #行 while i <= 9: j =1 #列 内循环 while j <= i: print(f'{j} * {i} = {i*j}\t', end='') j+= 1 print('') i += 1