i am a python beginner trying to come up with a nested loop but the output does not arrange the symbol in rows and columns but as a straight vertical column... Here's my code...help me fix it
rows = int(input("Enter the number of rows: "))
columns = int(input("Enter the number of columns: "))
symbol = input("Enter the symbol to use: ")
for i in range(rows):
for j in range(columns):
print(symbol)
print()
i've asked around my classmates and no one seems to know the problem
You could call print() multiple (row * columns) times or just once per outer (rows) loop by building a string of the appropriate column length as follows:
Of course, you don't actually need a nested loop to achieve your output objective. You could just do this: