Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson5_7

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson5_7
  • diy2.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 6d8c7c3f
    BellCodeEditor committed 2 years ago
    6d8c7c3f
diy2.py 317 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
'''
i = 5   # 行
j = 3   # 列
print(j,"*",i,"=",(j*i))# 使用变量i和j,代替乘法算式里面的元素,打印出单个乘法算式


i=1
for j in range(1,10):
    print(j,"*",i,"=",(j*i),end="  ")
'''


for i in range(1,10):
    for j in range(1,i+1):
        print(j,"*",i,"=",(j*i),end="  ")
    print()