How to write a program that prints a string a successive number of times (defined by user), in the same number of lines? : I am EXTREMELY new to programming. I am trying to write a function that prints the string '$' a number of times defined by the user, successively reaching that number in the same amount of lines. For instance, if the number is 5, then the output should be

$

$$

$$$

$$$$

$$$$$

I have already tried a for loop. I honestly don't even know what sort of function would accomplish the desired result. I know this isn't right, but am I at least on the right track?

def func():
    number = int(input('Enter a positive integer:  '))
    for i in range(number):
        print('$'*number)
        number = number + int(input('Enter a positive integer:  '))
    print()
func()

All I can  get it to do is print the string the specified number of times, in the same loop. And if the user inputs another integer, then it will print one line with the old value and the new added together.