I am required to use nested for loops and print(\'*\', end=\' \') to create the pattern shown here:
print(\'*\', end=\' \')
And here is my code. I have figured out the first t
i=0 while(i<5): j=0 while(j<=i): print("*",end="") #end="" is given to stay on same line j=j+1 print("") #it will take u to new line i=i+1 j=0 i=i-2 j=i while(i>=0): while(j>=0): print("*",end="") j=j-1 print() #will also work i=i-1 j=i
this will also work