mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Small fix in python
This commit is contained in:
parent
03ac46f566
commit
aa66a13d49
@ -328,7 +328,8 @@ def add(x, y):
|
|||||||
return x + y # Return values with a return statement
|
return x + y # Return values with a return statement
|
||||||
|
|
||||||
# Calling functions with parameters
|
# Calling functions with parameters
|
||||||
add(5, 6) #=> 11 and prints out "x is 5 and y is 6"
|
add(5, 6) #=> prints out "x is 5 and y is 6" and returns 11
|
||||||
|
|
||||||
# Another way to call functions is with keyword arguments
|
# Another way to call functions is with keyword arguments
|
||||||
add(y=6, x=5) # Keyword arguments can arrive in any order.
|
add(y=6, x=5) # Keyword arguments can arrive in any order.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user