def absolutevalue(num):
if num >= 0:
abs_num = num
else:
abs_num = -num
print("The absolute value"+ abs_num)
If I try to run the function absolutevalue(4), it throws error as follows
Traceback (most recent call last):
File "<ipython-input-16-36bd355eb83d>", line 1, in <module>
absolutevalue(4)
File "<ipython-input-15-42a3de37c325>", line 6, in absolutevalue
print("The absolute value"+ abs_num)
TypeError: must be str, not int