diff --git a/11_Day_Functions/11_functions.md b/11_Day_Functions/11_functions.md index 2a0ad39b8..1b54c6021 100644 --- a/11_Day_Functions/11_functions.md +++ b/11_Day_Functions/11_functions.md @@ -149,7 +149,7 @@ def sum_of_numbers(n): total = 0 for i in range(n+1): total+=i - print(total) + return total print(sum_of_numbers(10)) # 55 print(sum_of_numbers(100)) # 5050 ``` diff --git a/12_Day_Modules/12_modules.md b/12_Day_Modules/12_modules.md index caa6e94b8..a58270491 100644 --- a/12_Day_Modules/12_modules.md +++ b/12_Day_Modules/12_modules.md @@ -201,7 +201,7 @@ print(sqrt(2)) # 1.4142135623730951 print(pow(2, 3)) # 8.0 print(floor(9.81)) # 9 print(ceil(9.81)) # 10 -print(math.log10(100)) # 2 +print(log10(100)) # 2 ``` @@ -214,7 +214,7 @@ print(sqrt(2)) # 1.4142135623730951, square root print(pow(2, 3)) # 8.0, exponential print(floor(9.81)) # 9, rounding to the lowest print(ceil(9.81)) # 10, rounding to the highest -print(math.log10(100)) # 2 +print(log10(100)) # 2 ``` When we import we can also rename the name of the function. @@ -251,7 +251,7 @@ print(randint(5, 20)) # it returns a random integer number between [5, 20] inclu ### Exercises: Level 1 -1. Writ a function which generates a six digit/character random_user_id. +1. Write a function which generates a six digit/character random_user_id. ```py print(random_user_id()); '1ee33d' diff --git a/17_Day_Exception_handling/17_exception_handling.md b/17_Day_Exception_handling/17_exception_handling.md index c5d082388..e12aea775 100644 --- a/17_Day_Exception_handling/17_exception_handling.md +++ b/17_Day_Exception_handling/17_exception_handling.md @@ -270,7 +270,7 @@ for index, item in enumerate([20, 30, 40]): for index, i in enumerate(countries): print('hi') if i == 'Finland': - print('The country {i} has been found at index {index}') + print(f'The country {i} has been found at index {index}') ``` ```sh diff --git a/19_Day_File_handling/19_file_handling.md b/19_Day_File_handling/19_file_handling.md index de51b9bd1..7aa65d067 100644 --- a/19_Day_File_handling/19_file_handling.md +++ b/19_Day_File_handling/19_file_handling.md @@ -41,7 +41,7 @@ So far we have seen different Python data types. We usually store our data in different file formats. In addition to handling files, we will also see different file formats(.txt, .json, .xml, .csv, .tsv, .excel) in this section. First, let us get familiar with handling files with common file format(.txt). -File handling is an import part of programming which allows us to create, read, update and delete files. In Python to handle data we use _open()_ built-in function. +File handling is an important part of programming which allows us to create, read, update and delete files. In Python to handle data we use _open()_ built-in function. ```py # Syntax diff --git a/readme.md b/readme.md index 95bae55af..e586f7147 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,7 @@ # 🐍 30 Days Of Python +The last day I studied was 20 or something. Should double check. + Learn with Asabeneh by joining the upcoming [CODING BOOTCAMP](https://docs.google.com/forms/d/e/1FAIpQLSf0oNIYR9XU1DCctfl-pY36KbWse-SQX5aQaUgetqSinFYnmQ/viewform) |# Day | Topics |