DAY 22(CODE INFINITY)

Today we will see some codes to print some pattern using loops so Let's get started with a simple pattern and that is:

*

* *

* * *

we will print this using a code:

name='*'

for i in name:

      print(i,end=" ")

print('\n')

name1='**'

for i in name1:

      print(i,end="  ")

print('\n')

name2='***'

for i in name2:

      print(i,end="  ")

Screenshot of the repel:


Link of the repel:

https://replit.com/@shwetaantil97/star-patterns#program%20to%20print%20star%20pattern%201,2,3%20star%20pattern.py


Comments

Popular posts from this blog