- 2

What is wrong in this code for hollow square pattern of stars

n = 3 for i in range (n): print ("*" , end="") if ( i == 0 or n-1 == i): print("*" * (n-2), end="") else: print("" * (n-2), end="") print ("*")

24th Jan 2022, 6:30 PM
Silly 😜 Programmer
4 odpowiedzi
+ 2
Put a Space between "" in the else branch
24th Jan 2022, 6:36 PM
Oma Falk
Oma Falk - avatar
+ 1
Yeah it's working thank you so much friend
24th Jan 2022, 6:40 PM
Silly 😜 Programmer
+ 1
Right....you get better each Week.
24th Jan 2022, 6:43 PM
Oma Falk
Oma Falk - avatar
0
Plz give me some tips for my logic building and enhancing programming knowledge like you Oma Falk
24th Jan 2022, 6:56 PM
Silly 😜 Programmer