• 练习 三角形


    #打印9 9乘法哥

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


    for i in range(1,5):
    print((5 - i) * " ",end="")
    print(i * "* ")
    for i in range(5,8):
    print((i - 3) * " ",end="")
    print(( 8 - i) * "* ")

    for i in range(4):
    for j in range(4):
    print("* ",end="")
    print("")


    for i in range(5,8):
    print((i - 3) * " ",end="")
    print(( 8 - i) * "* ")
    for i in range(1,5):
    print((5 - i) * " ",end="")
    print(i * "* ")



  • 相关阅读:
    第十周作业
    第九周作业
    软件工程作业2
    自我介绍
    2019学习总结
    第二周作业
    十二周
    十一周
    第十周作业
    第九周作业
  • 原文地址:https://www.cnblogs.com/houchaoying/p/12957496.html
Copyright © 2020-2023  润新知