如何用Python写九九乘法表while循环for循环

 时间:2024-10-12 04:03:43

1、方法一:for循环

2、打开pycharm,输入代码。for i in range(1,10): for m in range(1,i+1): print(f"{足毂忍珩i} * {m} = {i*m}",end=" ") print('')

如何用Python写九九乘法表while循环for循环

4、方法二:while循环

5、输入代码i = 1while i < 10: m = 1 嘛术铹砾while m <= i: print(f"{足毂忍珩i} * {m} = {i*m}",end=" ") m+=1 print("") i+=1

如何用Python写九九乘法表while循环for循环
  • 使用python语言求1+2+3+...+100的和
  • python统计字符串中字母数字出现的次数
  • python输入两个整数,输出两个整数的和
  • python大小写字母转换
  • python创建列表
  • 热门搜索
    法式风格特点 淘宝全球购怎么申请 生存战争攻略 旅游胜地英文 贵州赤水旅游景点 微信怎么发红包给好友 南沙群岛旅游 半球电磁炉怎么样 xc60怎么样 临汾旅游