TypeError in function argument. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

TypeError in function argument.

I typed program as def print_sum_twice(x,y): print(x+y) print(2(x+y)) print_sum_twice(5,8) 13 Traceback (most recent call last): File "<pyshell#42>", line 1, in <module> print_sum_twice(5,8) File "<pyshell#41>", line 3, in print_sum_twice print(2(x+y)) TypeError: 'int' object is not callable How to give command to print(2(x+y))?

15th Jul 2020, 11:59 AM
Rushit Soni
Rushit Soni - avatar
1 Answer
+ 2
Print (2*(x+y))
15th Jul 2020, 12:17 PM
Tomiwa Joseph
Tomiwa Joseph - avatar