+ 2
Function
When we are writing a function. We have to define the variables and arguments at the same time? Purpose for the arguments? I am writing a simple program to multiply three numbers from user and returns the product.
2 Answers
+ 3
How about this funtion. This funtion has no parameters and it doesnât accept any arugument.
def multiply():
a= int(input())
b = int(input())
c = int(input())
return a*b*c
multiply()
Arguments are just values. Paramater is important. You must use the same paramater name , indside the funtion. To access the value it recieved when calling the funtion.
def multiply(a,b,c):
return a*b*c
multiply(1,2,3)
+ 2
Thank you so much!! Building patience to learn coding..beginner. Appreciate your supportđ