Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrections in 11th, 12th, 17th and 19th day modules #649

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 11_Day_Functions/11_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
6 changes: 3 additions & 3 deletions 12_Day_Modules/12_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```

Expand All @@ -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.
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion 17_Day_Exception_handling/17_exception_handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 19_Day_File_handling/19_file_handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 🐍 30 Days Of Python

The last day I studied was 20 or something. Should double check.

<strong>Learn with Asabeneh by joining the upcoming [<em>CODING BOOTCAMP</em>](https://docs.google.com/forms/d/e/1FAIpQLSf0oNIYR9XU1DCctfl-pY36KbWse-SQX5aQaUgetqSinFYnmQ/viewform) </strong>

|# Day | Topics |
Expand Down