Loops: Asterisks

Write a program, Asterisks_YI.py that prints the following pattern separately, one below the other each pattern separated front he next by one blank line. Use nested for loops ONLY to generate the patterns. All asterisks (*) should be printed by a single statement of the form

print(‘*’),

which causes the asterisks to print side by side separated by a space.
Hint: The last two patterns require that each line begin with an appropriate number of blanks.

##a.
##*
##**
##***
##****
##*****
##******
##*******
##********
##*********
##**********
##
##b.
##**********
##*********
##********
##*******
##******
##*****
##****
##***
##**
##*
##
##c.
## **********
##  *********
##   ********
##    *******
##     ******
##      *****
##       ****
##        ***
##         **
##          *
##
##d.
##          *
##         **
##        ***
##       ****
##      *****
##     ******
##    *******
##   ********
##  *********
## **********

Some help:

for i in range(5):
    print('*',end=' ' )
print(' ')
for j in range(5):
    print('*',end=' ')
print('')

not-nested for loops
* * * * *  
* * * * * 

print('nested for loops')
for i in range(5): #outer
    for j in range(5):  #inner
        print('*',end=' ')
    print('')

nested for loops
* * * * * 
* * * * * 
* * * * * 
* * * * * 
* * * * * 
>>> 

Extra Credit: Combine your code from the four separate problems into a single program that prints all four patterns side by side by making clever use of nested for loops. For all parts of this program – minimize the number of statements that print these characters.

asterisksPatterns