+ 1
Use a nested for loop
Print: **** *** **** *** My code: for row in range(4): for col in range(4): if(): print(end = " ") else: print('*', end = ' ') print()
3 Antworten
+ 5
You can also put this condition in your program
if(col == 0 and row % 2 == 1):
Because we can see that in even rows and when col is 0 then only it's showing spaces
https://code.sololearn.com/c35hafb2F5Q5/?ref=app
It's your code only just given the condition
Happy Learning 🙂