python如何打印99乘法表 | 您所在的位置:网站首页 › python打印99乘法表倒三角 › python如何打印99乘法表 |
python打印99乘法表的方法:1、使用【for-for】;2、使用【while-while】;3、使用【while-for】;4、使用【for-while】;5、 定义一个变量a,代码为【for i in a:j=1】。 相关学习推荐: python教程
python打印99乘法表的方法:1、使用【for-for】;2、使用【while-while】;3、使用【while-for】;4、使用【for-while】;5、 定义一个变量a,代码为【for i in a:j=1】。 相关学习推荐:python教程 python打印99乘法表的方法: 第1种方式: 使用for-for # 九九乘法表 for i in range(1, 10): for j in range(1, i+1): print('{}x{}={}\t'.format(j, i, i*j), end='') print()第2种方式: 使用while-while # 九九乘法表 i = 1 while i |
CopyRight 2018-2019 实验室设备网 版权所有 |