I want all three shapes on the same line...please help...!!!!
Posted
by sp
on Stack Overflow
See other posts from Stack Overflow
or by sp
Published on 2010-04-02T04:10:40Z
Indexed on
2010/04/02
4:13 UTC
Read the original article
Hit count: 272
python
|nested-loops
#Top half of triangle
for rows in range (5):
for row in range (12):
print("-", end='')
print()
for row in range (5):
stars=0
while stars<=row:
print("*", end='')
stars=stars+1
print()
for row in range(5):
star=4
while star>=row:
print("*", end='')
star=star-1
print()
© Stack Overflow or respective owner