Python---打印奇數行

line = int(input(‘請輸入一個數字’)) for i in range(1,line+1): if i < (line+1)/2: print(’’,’ '(line-i),’’) if i == (line+1)/2: m = 1 for m in range(1, line+1): print(’’,’ ‘(m+1),’’,) m += 1
相關文章
相關標籤/搜索