本帖最後由 tonyh 於 2022-7-14 16:12 編輯
- for i in range(____):
- for j in range(____):
- print(" ",end="")
- for j in range(____):
- print("*",end="")
- print()
複製代碼- for i in range(1,6):
- for j in range(1,6-i):
- print(" ",end="")
- for j in range(1,i*2):
- print("*",end="")
- print()
複製代碼- for i in range(5):
- for j in range(4-i):
- print(" ",end="")
- for j in range(i*2+1):
- print("*",end="")
- print()
複製代碼 |