0

help i dont understand

def multiply(a, b): a * b

22nd Feb 2017, 4:09 PM
code-junkie
code-junkie - avatar
3 Respostas
+ 2
If it is a function, it needs to return something. Otherwise, running it is kind of useless. So you probably need to say: def multiply(a, b): return a * b
16th Nov 2020, 10:54 AM
ArthurVa
ArthurVa - avatar
+ 1
def multiply(a, b) #create function with parameters a and b return a * b #return multiply a on b multiply(2, 5) #you call function what will multiply 2 on 5 and return result
22nd Feb 2017, 5:02 PM
Ruslan Ovcharenko
Ruslan Ovcharenko - avatar
0
return or print a*b value and also indent your code in python.
22nd Feb 2017, 6:54 PM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar