VARIS VONGUEA-AREE

🔥🇹🇭 Bangkok Thailand

High level experience in web design and development knowledge, producing quality work.

For more info
  • Home
  • About
  • project
  • Blog
    • th
  • Varisz
  • Python
  • Python Quize

Python Quize

Triangle

while True:
    Line = int(input("Enter the number of lines in the triangle (or 0 to quit): "))
    if Line == 0:
        break

    for i in range(Line, 0, -1):
        for j in range(Line-i):
            print(' ', end='')
        for j in range(i*2-1):
            if j == 0 or j == (i*2-2) or i == Line:
                print('*', end='')
            else:
                print(' ', end='')
        print()

Related

Rust Functions
WordPress WP_Query
Python Concurrency
SQL

© 2021 All rights reserved by varisz