如何用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创建列表
  • 热门搜索
    十渡旅游 理县旅游 旅游投资 旅游度假村 成都到云南旅游团 儋州旅游 三亚旅游地图 湛江旅游地图 海南 旅游 旅游酒店预订