0
for loops in pyhon
I see a code on the internet and I can't understand why print() is used in the outer loop?? rows = int(input("how many rows?")) columns = int(input("how many columns?")) symbol = input("enter your symbol : ") for i in range(rows): for j in range(columns): print(symbol, end="") print()
2 Respuestas
+ 11
What it does is print a new line when all columns of symbols have been printed
You can understand it if you comment the #print() and you will see that the result would be pasted on the same line
+ 2
Yashar ,
Ah. A new misspelling specimen for my collection, pyhon.
Collected so far:
pthon
Pthon
Puthon
Phyton
Putgon
pyhton
pyhon