def print_multiples(n):
... i = 1
... while i <= 6:
... print m * i, '\t',
... i += 1
...
>>>
My modified program of this program was:
>>> def print_multples(n):
... i = 1
... while i <= 6:
... print n * i, '\t',
... i += 1
...
>>>
The error was where i += 1 was suppose to be found right under print n * i, '\t', but instead I missed typed. I tried figuring out a way to allow this program to stop generating the number 3 but so far I've been unable to find a way to get the program to stop the generation.
def print_mult_table():
i = 1
while i <= 6:
print_multiples(i)
i += 1
The book told me to wrap this program into the program I first created. So the overall program is:
def print_mult_table():
i = 1
while i <= 6:
print_multiples(i)
i += 1
def print_multiples(n):
i = 1
while i <= 6:
print n * i, '\t',
i += 1
i = 1
while i <= 6:
print_multiples(i)
i += 1
After I applied this program to the terminal I got:
File "print_multiples.py", line 13, in print_multiples
print_multiples(i)
I got this error a good 50 times in the terminal. I really don't get what the results of this program means. I really don't know if this program has a error or that the program is suppose to out put File "print_multiples.py", line 13, in print_multiples
print_multiples(i)