+ 1

Can anyone help me in that, is it correct or anything wrong

def_addition(args1,args2) args3 = args1 + args2 return args def substraction(args1,args2) args3 = args1 - args2 return args def multiplication(args1,args2) args3 = args1 * args2 return args def division(args1,args2) args3 = args1 / args2 return args print("the result of addition is", addition(80,100)) print("the result of substraction is", substraction(80,100)) print("the result of multiplication is", multiplication(80,100)) print("the result of division is", division(80,100))

22nd Sep 2020, 12:27 PM
Thiak Ayuen
Thiak Ayuen - avatar
2 Answers
+ 4
Hi THIAK AYUEN THIAK What do you want it to do?
22nd Sep 2020, 12:34 PM
Vachila64☕
Vachila64☕ - avatar
+ 2
You must return args3 and not args. You are missing a colon after every function declaration. This is a shorter version. def addition(args1,args2): return args1 + args2 def substraction(args1,args2): return args1 - args2 def multiplication(args1,args2): return args1 * args2 def division(args1,args2): return args1 / args2 print("the result of addition is", addition(80,100)) print("the result of substraction is", substraction(80,100)) print("the result of multiplication is", multiplication(80,100)) print("the result of division is", division(80,100))
22nd Sep 2020, 12:36 PM
Avinesh
Avinesh - avatar