Search code snippets, questions, articles...

# Python Program - Pattern Program 2

k=1
for i in range(0,5):
    for j in range(0,k):
        print("* ",end=" ")
        k=k+2
        print()
Output
# Python Program - Pattern Program 2

Using range 

Was this helpful?
0 Comments
Programming Feeds
Learn something new everyday on Devsheet