Created
June 11, 2020 06:21
-
-
Save linzino7/59946ca1fbcbeeccdd8a2de7a1d26816 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Jun 11 12:22:10 2020 | |
@author: Zino | |
""" | |
# 印出一列 | |
for j in [1,2,3,4,5]: | |
print("*", end =" ") | |
# 印出兩列 | |
for i in [1,2,3,4,5]: | |
for j in [1,2,3,4,5]: | |
print("*", end =" ") | |
print() | |
# 逐步執行 | |
import time | |
for i in [1,2,3,4,5]: | |
print("i = "+str(i)+"|", end =" ") | |
for j in [1,2,3,4,5]: | |
print(str(j), end =" ") | |
time.sleep(1) | |
print( "換行" ) | |
# 三角形 | |
for i in range(1,6): | |
for j in range(1,i): | |
print("*", end =" ") | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment