I tried this code:
def multiplyTen(num):
result = num * 10
text = "{} multiplied by 10 = {}."
print(text.format(num, result))
But I got an error:
The error goes away when I remove the line: print(text.format(num, result))
. Why does this line cause such an error? Why doesn't it occur when I put this code outside of a function?