+ 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
2 odpowiedzi
+ 2
Print (2*(x+y))
15th Jul 2020, 12:17 PM
Tomiwa Joseph
Tomiwa Joseph - avatar