I was trying to making a simple pattern that allows the user to decide the numer of rows and columns, for example:
How many rows: 5
How many columns: 5
>>>
*****
*****
*****
*****
*****
So my code is like this:
row = int(input('How many rows: '))
col = int(input('How may columns: '))
for row in range(row):
for col in range(col):
print ('*', end='')
But the result is this:
*****
****
***
**
*
I realized that I assigned the variable name for the variable of the for loop the same as the variable for my input. I, however, don't understand the logic for that code. It would be great if you guys can explain to me something like a flowchart.