+ 1

Function Argument

Can anyone solve this progam what error occurs here.. def print_sum_twice(x, y): print(x + y) print(x + y) e=input("enter 1: ") print (e) r=input("enter 2: ") print (r) print_sum_twice(float(e), float(r))

25th Jan 2019, 1:07 PM
Deep singh Sodhi
Deep singh Sodhi - avatar
2 Respostas
+ 3
Did you want to sum up the values twice? Because you're not saying that in your function, you just print out the value of the same x + the same y two times.
25th Jan 2019, 1:23 PM
HonFu
HonFu - avatar
+ 1
I just tested it. It worked fine.
25th Jan 2019, 1:17 PM
James
James - avatar