回覆列表
  • 1 # 使用者3136867717565

    #!/usr/bin/env python

    # -*- coding:utf-8 -*-

    print "\n".join(["*"*7 for i in range(4)])

    print "\n"

    print "\n".join(["*"*(i*2+1) for i in range(4)])

    print "\n"

    print "\n".join([("*"*(i*2+1)).center(7, " ") for i in range(4)])

    print "\n"

    print "\n".join([("*"*(abs(i-3)*2+1)).center(7, " ") for i in range(4)])

    print "\n"

    print "\n".join([("*"*([i,abs(i-6)][i>3]*2+1)).center(7, " ") for i in range(7)])

    print "\n"

    print "\n".join(["*"*([i,abs(i-6)][i>3]*2+1) for i in range(7)])

    各種型 沒有達到你的要求 再追問

    >>> ================================ RESTART ================================

    >>>

    *******

    *******

    *******

    *******

    *

    ***

    *****

    *******

    *

    ***

    *****

    *******

    *******

    *****

    ***

    *

    *

    ***

    *****

    *******

    *****

    ***

    *

    *

    ***

    *****

    *******

    *****

    ***

    *

    >>>

  • 中秋節和大豐收的關聯?
  • 一個男生最掉價的行為是什麼?