I need to write a function that receives an input and turns that input into a number of rows and all of the rows will be identical, all of the rows will look like this "**********".
I wrote this:
def rows(n):
row = "*" * 10
for i in range(0,n):
for j in range(0,i):
print (row)
cant = int(input("Choose the number of rows: "))
total = rows(cant)
But whenever I run it and for example make an input of 4 rows it prints 5, if I use 5 as an input it prints 10 rows. None of the inputs work except if I make a 3,if I make the input a 3 it will properly print 3 rows of 10 stars. How can I fix this?