mirror of
https://github.com/Asabeneh/30-Days-Of-Python.git
synced 2026-06-12 21:01:48 +08:00
Update 11_functions.md
This commit is contained in:
parent
ff24ab221f
commit
b8ed0ee1dc
@ -365,7 +365,7 @@ print(generate_groups('Team-1','Asabeneh','Brook','David','Eyob'))
|
||||
```py
|
||||
#You can pass functions around as parameters
|
||||
def square_number (n):
|
||||
return n * n
|
||||
return n ** n
|
||||
def do_something(f, x):
|
||||
return f(x)
|
||||
print(do_something(square_number, 3)) # 27
|
||||
|
||||
Loading…
Reference in New Issue
Block a user