python

# 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?