I installed Python 3.0 and now I can’t get my code to work. Does anyone have any suggestions?
def print_multiples(n, high):
for i in range(1, high+1):
print(n * i, end=' ')
print()
def print_mult_table(high):
for i in range(1, high+1):
print_multiples(i, high)
print print_mult_table(7)
My output looks like this:
File "chp7.py", line 82
print print_mult_table(7)
SyntaxError: invalid syntax
In Python 3 print() is a function not a statement so you should use: