I am required to use nested for loops and print(\'*\', end=\' \')
to create the pattern shown here:
And here is my code. I have figured out the first t
Pattern 1
for x in range(1,11):
print("*"*x)
Output
*
**
***
****
*****
******
*******
********
*********
**********
Pattern 2
for x in range(10,0,-1):
print("*"*x)
Output
**********
*********
********
*******
******
*****
****
***
**
*
Pattern 3
i=0
for x in range(10,0,-1):
print(" "*i,end="")
print("*"*x)
i+=1
Output
**********
*********
********
*******
******
*****
****
***
**
*
Pattern 4
i=10
for x in range(1,11):
print(" "*i,end="")
print("*"*x)
i-=1
Output
*
**
***
****
*****
******
*******
********
*********
**********