0

why do i get a error in this code

def add_numbers(x, y): total = x + y return total x = 5 y = 4 z = add_numbers(add_numbers(x,y),(add_numbers(x,y)) print(z)

13th Sep 2017, 3:36 AM
Darius Robinson
Darius Robinson - avatar
2 Antworten
+ 6
line 7, where you are calling the function add_numbers(), you have too many brackets in the 2nd argument. Here's the corrected version: z = add_numbers(add_numbers(x,y), add_numbers(x,y))
13th Sep 2017, 4:03 AM
Sapphire
0
Wow OK thank you the simple things screw me up you have to pay close attention in coding
13th Sep 2017, 5:00 AM
Darius Robinson
Darius Robinson - avatar