Call the function and assign the output the result variable.
call function: add(1,2)
This function is named add. it has two parameters (x,y)
Functions
m
Defining functions
def
add(x,y):
print('Performing addition')
return
x+y
output:
Performing addition
3
result = add(1,2)
Functions
Hier klicken, um ihre
Nap zu zentrieren.
Hier klicken, um ihre
Nap zu zentrieren.