0

please why doesn't it execute properly

def multiply(a, b): a * b

5th Jun 2020, 2:10 AM
Gyan Adu
Gyan Adu - avatar
3 odpowiedzi
+ 2
Gyan Adu it would help to see the rest of the code.... this is incomplete by itself.
5th Jun 2020, 2:12 AM
BroFar
BroFar - avatar
+ 2
def multiply(a,b) return (a*b) print(multiply(2,3)) =>6
5th Jun 2020, 2:26 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Maybe because you don't have a return statement, like return a*b otherwise, you are not storing the result of the multiplication anywhere
5th Jun 2020, 2:14 AM
TheBigOne
TheBigOne - avatar