Skip to content

Commit 4d7f24b

Browse files
authored
Merge pull request #191 from kunal254/patch-1
Minor bug fixes and typos.
2 parents 26e3727 + f467adc commit 4d7f24b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

11_Day_Functions/11_functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ Generally avoid this unless required as it makes it harder to understand what th
403403
```py
404404
#You can pass functions around as parameters
405405
def square_number (n):
406-
return n * n
406+
return n ** n
407407
def do_something(f, x):
408408
return f(x)
409409
print(do_something(square_number, 3)) # 9

13_Day_List_comprehension/13_list_comprehension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ numbers = [-8, -7, -3, -1, 0, 1, 3, 4, 5, 7, 6, 8, 10]
9292
positive_even_numbers = [i for i in numbers if i % 2 == 0 and i > 0]
9393
print(positive_even_numbers) # [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
9494

95-
# Flattening a three dimensional array
95+
# Flattening a two dimensional array
9696
list_of_lists = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
9797
flattened_list = [ number for row in list_of_lists for number in row]
9898
print(flattened_list) # [1, 2, 3, 4, 5, 6, 7, 8, 9]

15_Day_Python_type_errors/15_python_type_errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ ZeroDivisionError: division by zero
348348
We cannot divide a number by zero.
349349

350350
We have covered some of the python error types, if you want to check more about it check the python documentation about python error types.
351-
If you are good at reading the error types then you will be able to fix your bugs fast and you will also become a better programmer.
351+
If you are good at reading the error types, then you will be able to fix your bugs fast and you will also become a better programmer.
352352

353353
🌕 You are excelling. You made it to half way to your way to greatness. Now do some exercises for your brain and for your muscle.
354354

0 commit comments

Comments
 (0)