Skip to content

Commit 117bc32

Browse files
authored
Update README.md
1 parent a96cd35 commit 117bc32

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

exercises/06-lambda-functions/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,42 @@ tutorial: "https://www.youtube.com/watch?v=HACQ9uerCuE"
33
---
44

55

6-
# `06` Lambda functions in Python
6+
# `06` Lambda Functions in Python
77

88
A **lambda function** is a function with just one line of code and no name.
99

10-
It is a very special type of funcion in the world of python because you can use it as a small utility for very agile coding:
10+
It is a very special type of function in the world of Python because you can use it as a small utility for very agile coding:
1111

1212
```python
13-
# declaring a normal funcion for multiplication
13+
# Declaring a normal function for multiplication
1414
def multiply(p1, p2):
1515
return p1 * p2
1616

17-
# declaring it now like a one line lambda
17+
# Declaring it now like a one line lambda function
1818
multiply = lambda p1,p2: p1 * p2
1919
```
20-
:point_uo:Facts:
20+
👉 Facts:
2121

22-
+ **Lambda fuctions** have to be always very small.
22+
+ **Lambda functions** have to always be very small.
2323

24-
+ **Lambda function** can only have one line.
24+
+ **Lambda functions** can only have one line.
2525

26-
+ **Lambda function** doesn't need a `return` statement (it is assumed that it will return whatever is on that one line).
26+
+ **Lambda functions** don't need a `return` statement (it is assumed that it will return whatever is on that one line).
2727

28-
+ **Lambda functions** can be stored in variables or passed as parameters to another function
28+
+ **Lambda functions** can be stored in variables or passed as parameters to another function.
2929

3030
## 📝 Instructions:
3131

3232
1. Create a variable called `is_odd`.
3333

3434
2. Assign a **lambda function** to it that returns `True` or `False` if a given number is odd.
3535

36-
## 💡Hint
36+
## 💡 Hint
3737

3838
+ Here is how you would declare it like a normal function:
3939

4040
```py
41-
# this function return True if a number is odd.
41+
# This function returns True if a number is odd.
4242
def is_odd(num):
4343
return num % 2 != 0
4444
```

0 commit comments

Comments
 (0)