jeudi 16 septembre 2021

Python program to print star pattern square type [closed]

Not able to solve this problem , unable to understand the if condition Star pattern Question image expected answer

I have attached the question image below

for i in range(1,4,1):

for j in range(1,n+1,1):
    If ((j%2)==0 & (j%4 != 0) & (i==1) & ):
        print("* ")
     else:
        print("  ")
print()

Aucun commentaire:

Enregistrer un commentaire