Python 代码:. rows = int(input()). lines = [' '*i+'*'*(rows-i) for i in range(0, rows)]. for line in lines: print(line). 5.打印菱形.
確定! 回上一頁