Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
97a6d5d
Update 10_loops.md
SakshamJain7 Oct 1, 2020
139c2f4
Update 10_loops.md
SakshamJain7 Oct 1, 2020
f69959a
Update 07_set.md - Change empty set declaration
srikar02 Jan 29, 2021
f9147f5
Correct line 202 typo
yasfatft Jan 30, 2021
59b998a
Update strftime.png url
yasfatft Jan 30, 2021
6e60171
Update day_5.py
dorindabassey Feb 20, 2021
dc039d2
Added pep8 styling to python files
ArtistBanda Mar 11, 2021
722664c
make parameters correct
WJHPrince Sep 7, 2021
433b4ad
Update 16_python_datetime.md
Sahil-Poonia-zz Sep 24, 2021
c9d1031
Bug fix in conditional
ezvizual Oct 28, 2021
b8ed0ee
Update 11_functions.md
kunal254 Feb 17, 2022
3e6f31e
Update 13_list_comprehension.md
kunal254 Feb 17, 2022
c6b8030
Update 15_python_type_errors.md
kunal254 Feb 18, 2022
f467adc
Update 19_file_handling.md
kunal254 Feb 20, 2022
9860f6f
Update 05_lists.md
dbuffel May 14, 2022
17779f3
Update 07_sets.md
dbuffel May 16, 2022
f209faf
Update 17_exception_handling.md
dbuffel May 18, 2022
ac7baaa
Update 17_exception_handling.md
dbuffel May 18, 2022
d3f8303
Update 18_regular_expressions.md
dbuffel May 18, 2022
ed30a8d
Update 20_python_package_manager.md
dbuffel May 18, 2022
14369a9
Update 26_python_web.md
dbuffel May 19, 2022
cdeec9b
Update 26_python_web.md
dbuffel May 19, 2022
b0c402b
made range function definition clearer
chinnaji Jun 13, 2022
b24a8ff
Edit Functions and Higher order functions
Odion-Sonny Jun 26, 2022
dfbf3e5
Message('Update to datetime.md and exception_handling.md')
Odion-Sonny Jun 28, 2022
9e70fef
commit on new_branch
Odion-Sonny Jun 28, 2022
cbc3dc2
"update date_time.md and exception_handling.md"
Odion-Sonny Jun 28, 2022
5c36b2d
Upate too 21_classes_and_objects.md
Odion-Sonny Jul 5, 2022
2290708
Update 21_classes_and_objects.md
Odion-Sonny Aug 7, 2022
247a5a0
Fixed typos + made numpy.shape example more clear
janekpaw321 Oct 1, 2022
07cc6f6
Merge pull request #1 from janekpaw321/janekpaw321-patch-1
janekpaw321 Oct 1, 2022
cf8b7b2
Typo in day 17
rublaman Oct 1, 2022
19f92a6
Incorrect use of brackets in Exercise 2
AdityaDanturthi Dec 21, 2022
bbe9cd7
init
Prosta4okua Jan 20, 2023
72eda2c
yes
Prosta4okua Jan 20, 2023
153a50f
day1 edit
Prosta4okua Jan 22, 2023
779feea
Infinite loop in continue example
trekar99 Feb 1, 2023
26d3410
replace ^ with ** on example day-one md file
amitai1997 Mar 5, 2023
de058e1
save without formatting
amitai1997 Mar 5, 2023
d53c932
docs(day_29): add import os
120EE0692 May 2, 2023
317ebd6
Update helloworld.py
anupama12sg Jul 31, 2023
e716b95
Update 21_classes_and_objects.md
sivajisj Aug 2, 2023
fdbf44e
Add Day 1 Spanish Translation
B3TsT Aug 8, 2023
fc88956
Add Day 2 Spanish Translation
B3TsT Aug 8, 2023
5236235
Add Day 3 Spanish Translation
B3TsT Aug 8, 2023
3e6ddf4
Add unfinished Day 1 Spanish Translation
B3TsT Aug 8, 2023
0701b87
Update 18_regular_expressions.md
JiaZombie Aug 11, 2023
2bedb4a
Importing the built-in function
Eyobs-droid Sep 19, 2023
7da86c1
Update 24_statistics.md
VSKANDHAN Sep 26, 2023
be963d1
Correct the spelling mistake in Q 21
adgan11 Nov 8, 2023
b6d3b25
little typo
ArifAyyildiz Jan 4, 2024
03b1d0d
remove repeated word
Abdoallah-Badr Jan 31, 2024
6410c8d
Fix URL in link
benlenarts Feb 14, 2024
13b5100
Update 19_file_handling.md
cccccccftzz Feb 24, 2024
55e21e0
Update 13_list_comprehension.md
Abdoallah-Badr Feb 26, 2024
78527f8
Update 13_list_comprehension.md
Jo-varo Mar 13, 2024
65d8dda
Update 13_list_comprehension.md
huang-x-h Mar 28, 2024
803e642
Updated day1
archangel7431 Apr 8, 2024
a5b0933
Update 11_functions.md
theolucky889 Apr 9, 2024
1e84bb9
Update 11_functions.md
theolucky889 Apr 9, 2024
930baf5
Update day_5.py
JohnnyGo-x May 16, 2024
adaf458
day14 opti, the change will make the sample easier to understand
Jul 18, 2024
2dfee6e
Update 17_exception_handling.md
benidi Jul 23, 2024
7da1a55
Update 02_variables_builtin_functions.md
JosephMurage Jul 24, 2024
135ef95
revert the comment
Jul 26, 2024
b9c2ee1
Update 07_sets.md
wbs99 Jul 31, 2024
3b290fc
Revised translation
sheep-realms Aug 8, 2024
3a052dd
fix typos
sheep-realms Aug 8, 2024
443e4b6
fix bug
sheep-realms Aug 11, 2024
3e49afc
fix bug
sheep-realms Aug 11, 2024
c8ceb01
add 15_Day_Python_type_errors Chinese support
Archie818 Aug 30, 2024
34a2910
added 16_Day_Python_date_time Chinese support
Archie818 Sep 3, 2024
194af0a
Fixing type from is_marred to is_married
mekku925 Sep 5, 2024
c305619
Merge branch 'master' into patch-1
rublaman Sep 10, 2024
77ca98a
Update 15_python_type_errors.md
DenishKakadiya Oct 10, 2024
e8a621a
Fixed spelling errors
Anaconda5707 Oct 27, 2024
cade9a1
correct some mistakes
mttaherpoor Nov 17, 2024
495954b
add symbols for create new sets
mttaherpoor Nov 17, 2024
9ae7833
add negative step for range
mttaherpoor Nov 17, 2024
47514b7
correct mistakes
mttaherpoor Nov 17, 2024
84c6360
Add keyword unpacking and variable number of named arguments
reenen Nov 17, 2024
590e2c1
Fixed the issue where the Chinese readme link could not be redirected…
cike8899 Nov 27, 2024
bcdc1f6
Revert "Fixed the issue where the Chinese readme link could not be re…
cike8899 Nov 27, 2024
0eaf759
Fixed the issue where the Chinese readme link could not be redirected…
cike8899 Nov 27, 2024
f65a3af
upload fixes and changes
rawbytedev Dec 31, 2024
20f33cc
uncomment
rawbytedev Dec 31, 2024
d4c1ef2
day_4.py roll 171 digit() should be isdigit().
skywalker0823 Feb 9, 2025
3c70b16
Merge pull request #675 from Asabeneh/Asabeneh-patch-4
Asabeneh Jun 4, 2025
4c31a61
Update countries.py
Ankit-kumar-CSE Aug 13, 2025
c29f9a3
Fix typos in readme.md
polyedr Aug 24, 2025
09b3e75
Fix isalpha() check for challenge string to return False
jbscript Aug 28, 2025
8fee374
Fix-592-Spelling-Mistake
shindeakshay0211 Sep 16, 2025
3b0232a
contributor section added
Asabeneh Sep 29, 2025
df8b764
Wispr flow logo changed
Asabeneh Sep 29, 2025
36942a6
night mode added
Asabeneh Sep 29, 2025
685b08f
night mode added
Asabeneh Sep 29, 2025
402dde5
duplicate content removed
Asabeneh Oct 1, 2025
bd3936f
Update 03_operators.md
Tasnimsomo Oct 6, 2025
a997103
Merge branch 'Asabeneh:master' into rawbytedev-patch-1
rawbytedev Oct 7, 2025
360f127
Fix Chinese navigation links after Day 7
rakei076 Oct 10, 2025
3d98a45
Merge pull request #713 from rakei076/fix-chinese-navigation-links
Asabeneh Oct 10, 2025
70748a0
sponsorship text has been modified
Asabeneh Nov 3, 2025
5638290
docs: fix overlapping grade ranges — make A 90-100 and non-overlappin…
Arcanixhades0 Nov 7, 2025
5ac5db0
Fix grammatical error on line 157
asiahcrutchfield Nov 11, 2025
1a207e6
Petrosky logo added in the sponsors list
Asabeneh Nov 16, 2025
1158cf5
typo
abrar115 Nov 17, 2025
ae43f8d
Update 06_tuples.md
rawbytedev Dec 2, 2025
286d2ed
Link updated
Ifenna3 Dec 9, 2025
cd7daf6
Fix format order in sentence construction
sjanwari Dec 10, 2025
501b0d4
Propose some typo fixes and ignore emacs backup files
jeis4wpi Dec 17, 2025
3dd667d
Display density with unit in operators.md
sakibumumuni Dec 29, 2025
453d973
Created Spanish section
KrucibleCoder Jan 3, 2026
4f1e5c6
Merge pull request #741 from jeis4wpi/master
Asabeneh Jan 10, 2026
76ca0ac
Merge pull request #747 from KrucibleCoder/master
Asabeneh Jan 10, 2026
9a473dc
Merge pull request #744 from sakibumumuni/patch-2
Asabeneh Jan 10, 2026
ded431b
Merge pull request #722 from asiahcrutchfield/patch-1
Asabeneh Jan 10, 2026
9522616
Merge pull request #733 from sjanwari/patch-2
Asabeneh Jan 10, 2026
85dce01
Merge pull request #732 from Ifenna3/patch-2
Asabeneh Jan 10, 2026
8bd806b
Merge pull request #724 from abrar115/day17Typo
Asabeneh Jan 10, 2026
d29a533
Merge pull request #720 from Arcanixhades0/fix/grade-ranges-day9
Asabeneh Jan 10, 2026
d51bec2
Merge pull request #702 from shindeakshay0211/Fix-592-Spelling-Mistake
Asabeneh Jan 10, 2026
4dc3b76
Merge pull request #618 from Anaconda5707/patch-1
Asabeneh Jan 10, 2026
37e39b9
Merge pull request #709 from Tasnimsomo/patch-1
Asabeneh Jan 10, 2026
16712cf
Merge pull request #697 from jbscript/master
Asabeneh Jan 10, 2026
4019e10
Merge branch 'master' into fix/readme-typos
Asabeneh Jan 10, 2026
3e17a67
Merge pull request #695 from polyedr/fix/readme-typos
Asabeneh Jan 10, 2026
57187b6
Merge pull request #628 from mttaherpoor/master
Asabeneh Jan 10, 2026
ec1f22f
Merge branch 'master' into rawbytedev-patch-1
Asabeneh Jan 10, 2026
48b838e
Merge pull request #712 from rawbytedev/rawbytedev-patch-1
Asabeneh Jan 10, 2026
cb74b2c
Merge pull request #581 from sheep-realms/patch-1
Asabeneh Jan 10, 2026
e3a5286
Merge pull request #575 from wbs99/patch-1
Asabeneh Jan 10, 2026
7d6b345
Merge pull request #605 from mekku925/patch-1
Asabeneh Jan 10, 2026
41d01fd
Merge pull request #610 from DenishKakadiya/patch-1
Asabeneh Jan 10, 2026
25a7ed3
Merge pull request #603 from Archie818/15_python_type_errors
Asabeneh Jan 10, 2026
e4d7f09
Merge branch 'master' into master
Asabeneh Jan 10, 2026
f23159a
Merge pull request #632 from cike8899/master
Asabeneh Jan 10, 2026
4329af3
Merge pull request #629 from reenen/patch-1
Asabeneh Jan 10, 2026
1b111b9
Merge pull request #498 from theolucky889/patch-3
Asabeneh Jan 10, 2026
5f4a4bb
Merge pull request #585 from sheep-realms/master
Asabeneh Jan 10, 2026
a9553ec
Merge branch 'master' into patch-4
Asabeneh Jan 10, 2026
8382cc9
Merge pull request #499 from theolucky889/patch-4
Asabeneh Jan 10, 2026
7d78d63
Merge branch 'master' into changes_to_readme
Asabeneh Jan 10, 2026
81c159a
Merge pull request #497 from archangel7431/changes_to_readme
Asabeneh Jan 10, 2026
e5fc905
Merge pull request #495 from huang-x-h/patch-1
Asabeneh Jan 10, 2026
2ce206b
Merge branch 'master' into patch-1
Asabeneh Jan 10, 2026
f422327
Merge pull request #485 from Jo-varo/patch-1
Asabeneh Jan 10, 2026
ad7fa13
Merge pull request #479 from Abdoallah-Badr/patch-2
Asabeneh Jan 10, 2026
f882629
Merge branch 'master' into patch-1
Asabeneh Jan 10, 2026
72e9db9
Merge pull request #569 from JosephMurage/patch-1
Asabeneh Jan 10, 2026
ebdc3c2
Merge pull request #474 from benlenarts/patch-1
Asabeneh Jan 10, 2026
bf54af9
Merge pull request #432 from B3TsT/master
Asabeneh Jan 10, 2026
0ceb390
Merge pull request #341 from Prosta4okua/master
Asabeneh Jan 10, 2026
4d94fa9
Merge branch 'master' into patch-9
Asabeneh Jan 10, 2026
4f7b8c5
Merge pull request #216 from dbuffel/patch-9
Asabeneh Jan 10, 2026
ac1d7b0
Merge pull request #472 from Abdoallah-Badr/patch-1
Asabeneh Jan 10, 2026
14b4300
Merge branch 'master' into master
Asabeneh Jan 10, 2026
54739b2
Merge pull request #467 from ArifAyyildiz/master
Asabeneh Jan 10, 2026
9c72c84
Merge pull request #691 from Ankit-kumar-CSE/patch-1
Asabeneh Jan 10, 2026
ed7f189
Merge pull request #604 from Archie818/16_python_datetime
Asabeneh Jan 10, 2026
271e732
Merge pull request #478 from cccccccftzz/patch-2
Asabeneh Jan 10, 2026
a709344
Merge pull request #521 from JohnnyGo-x/patch-3
Asabeneh Jan 10, 2026
f135247
Merge pull request #212 from dbuffel/patch-5
Asabeneh Jan 10, 2026
023588f
Merge pull request #445 from Eyobs-droid/testing1
Asabeneh Jan 10, 2026
fedf69d
Merge branch 'master' into master
Asabeneh Jan 10, 2026
acd6b5f
Merge pull request #425 from anupama12sg/master
Asabeneh Jan 10, 2026
09b360e
Merge pull request #427 from sivajisj/patch-2
Asabeneh Jan 10, 2026
f16bcba
Merge pull request #390 from 120EE0692/docs/day-29
Asabeneh Jan 10, 2026
3e50db7
Merge pull request #129 from dorindabassey/patch-2
Asabeneh Jan 10, 2026
6e80880
Merge branch 'master' into new_branch
Asabeneh Jan 11, 2026
f200a3a
Merge pull request #241 from Odion-Sonny/new_branch
Asabeneh Jan 11, 2026
8f60da0
Merge branch 'master' into master
Asabeneh Jan 11, 2026
5705246
Merge pull request #77 from SakshamJain7/master
Asabeneh Jan 11, 2026
80983bb
Merge branch 'master' into patch-1
Asabeneh Jan 11, 2026
b35eec3
Merge pull request #123 from srikar02/patch-1
Asabeneh Jan 11, 2026
3ed7aaa
Merge pull request #455 from adgan11/patch-1
Asabeneh Jan 11, 2026
acfe1d2
Merge pull request #348 from trekar99/patch-1
Asabeneh Jan 11, 2026
921bce1
Merge pull request #305 from rublaman/patch-1
Asabeneh Jan 15, 2026
07bcda4
Merge pull request #566 from benidi/patch-1
Asabeneh Jan 15, 2026
22c8335
Merge pull request #448 from VSKANDHAN/patch-1
Asabeneh Jan 15, 2026
47dae82
Merge pull request #226 from dbuffel/patch-18
Asabeneh Jan 15, 2026
101c2fc
Merge branch 'master' into fix-issue-#367
Asabeneh Jan 15, 2026
5fc9eca
Merge pull request #368 from amitai1997/fix-issue-#367
Asabeneh Jan 15, 2026
c099d4d
Merge pull request #304 from janekpaw321/master
Asabeneh Jan 15, 2026
a79058a
Merge branch 'master' into master
Asabeneh Jan 15, 2026
0e80172
Merge pull request #181 from ezvizual/master
Asabeneh Jan 15, 2026
412a30b
Merge pull request #331 from AdityaDanturthi/patch-7
Asabeneh Jan 15, 2026
dc6a6a3
Merge pull request #176 from Sahil-Poonia-zz/master
Asabeneh Jan 15, 2026
26e3727
Merge pull request #219 from dbuffel/patch-12
Asabeneh Jan 15, 2026
4d7f24b
Merge pull request #191 from kunal254/patch-1
Asabeneh Jan 15, 2026
aeeb3c9
Merge branch 'master' into python-loops-grammatical-error
Asabeneh Jan 15, 2026
48e543a
Merge pull request #238 from chinnaji/python-loops-grammatical-error
Asabeneh Jan 15, 2026
6c6ce01
Merge branch 'master' into pep8-styling
Asabeneh Jan 15, 2026
721cf90
Merge pull request #146 from ArtistBanda/pep8-styling
Asabeneh Jan 15, 2026
918db8d
Merge pull request #217 from dbuffel/patch-10
Asabeneh Jan 15, 2026
a0499ef
Merge pull request #220 from dbuffel/patch-13
Asabeneh Jan 15, 2026
7afb5fc
Merge pull request #126 from yasfatft/master
Asabeneh Jan 15, 2026
57f9198
Merge pull request #175 from WJHPrince/fix_day17_minor_problem
Asabeneh Jan 15, 2026
df63d20
Merge pull request #433 from JiaZombie/JiaZombie-patch-1
Asabeneh Jan 15, 2026
2e2db17
Merge branch 'master' into bug-fix
Asabeneh Jan 15, 2026
80d68ae
Merge pull request #645 from skywalker0823/bug-fix
Asabeneh Jan 15, 2026
02ffe16
Merge branch 'master' into patch-11
Asabeneh Jan 15, 2026
8bb6456
Merge pull request #218 from dbuffel/patch-11
Asabeneh Jan 15, 2026
58c2272
Merge branch 'master' into master
Asabeneh Jan 15, 2026
13bde40
Merge pull request #563 from kevindai007/master
Asabeneh Jan 15, 2026
9a1a08f
Update Python version command to use 'python3'
neiladake Jan 22, 2026
24d18fe
Merge pull request #756 from neiladake/patch-1
Asabeneh Jan 23, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ flask_project/ven/lib
numpy.ipynb
.ipynb_checkpoints
.vscode/
*~
test.py
12 changes: 7 additions & 5 deletions 01_Day_Introduction/helloworld.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Introduction
# Day 1 - 30DaysOfPython Challenge

print("Hello World!") # print hello world

print(2 + 3) # addition(+)
print(3 - 1) # subtraction(-)
print(2 * 3) # multiplication(*)
print(3 + 2) # addition(+)
print(3 - 2) # subtraction(-)
print(3 * 2) # multiplication(*)
Expand All @@ -16,8 +21,5 @@
print(type(1 + 3j)) # Complex
print(type('Asabeneh')) # String
print(type([1, 2, 3])) # List
print(type({'name':'Asabeneh'})) # Dictionary
print(type({9.8, 3.14, 2.7})) # Set
print(type((9.8, 3.14, 2.7))) # Tuple
print(type(3 == 3)) # Bool
print(type(3 >= 3)) # Bool
print(type({'name': 'Asabeneh'})) # Dictionary
print(type({9.8, 3.14, 2.7})) # Tuple
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

## Built in functions

In Python we have lots of built-in functions. Built-in functions are globally available for your use that mean you can make use of the built-in functions without importing or configuring. Some of the most commonly used Python built-in functions are the following: _print()_, _len()_, _type()_, _int()_, _float()_, _str()_, _input()_, _list()_, _dict()_, _min()_, _max()_, _sum()_, _sorted()_, _open()_, _file()_, _help()_, and _dir()_. In the following table you will see an exhaustive list of Python built-in functions taken from [python documentation](https://docs.python.org/3.9/library/functions.html).
In Python we have lots of built-in functions. Built-in functions are globally available for your use that mean you can make use of the built-in functions without importing or configuring. Some of the most commonly used Python built-in functions are the following: _print()_, _len()_, _type()_, _int()_, _float()_, _str()_, _input()_, _list()_, _dict()_, _min()_, _max()_, _sum()_, _sorted()_, _open()_, _file()_, _help()_, and _dir()_. In the following table you will see an exhaustive list of Python built-in functions taken from [python documentation](https://docs.python.org/3/library/functions.html).

![Built-in Functions](../images/builtin-functions.png)

Expand Down Expand Up @@ -229,7 +229,9 @@ print(num_str) # '10'

# str to int or float
num_str = '10.6'
num_float = float(num_str)
num_float = float(num_str) # Convert the string to a float first
num_int = int(num_float) # Then convert the float to an integer
print('num_int', int(num_str)) # 10
print('num_float', float(num_str)) # 10.6
num_int = int(num_float)
print('num_int', int(num_int)) # 10
Expand Down Expand Up @@ -280,22 +282,22 @@ Number data types in Python:
### Exercises: Level 2

1. Check the data type of all your variables using type() built-in function
1. Using the _len()_ built-in function, find the length of your first name
1. Compare the length of your first name and your last name
1. Declare 5 as num_one and 4 as num_two
1. Add num_one and num_two and assign the value to a variable total
1. Subtract num_two from num_one and assign the value to a variable diff
1. Multiply num_two and num_one and assign the value to a variable product
1. Divide num_one by num_two and assign the value to a variable division
1. Use modulus division to find num_two divided by num_one and assign the value to a variable remainder
1. Calculate num_one to the power of num_two and assign the value to a variable exp
1. Find floor division of num_one by num_two and assign the value to a variable floor_division
1. The radius of a circle is 30 meters.
2. Using the _len()_ built-in function, find the length of your first name
3. Compare the length of your first name and your last name
4. Declare 5 as num_one and 4 as num_two
5. Add num_one and num_two and assign the value to a variable total
6. Subtract num_two from num_one and assign the value to a variable diff
7. Multiply num_two and num_one and assign the value to a variable product
8. Divide num_one by num_two and assign the value to a variable division
9. Use modulus division to find num_two divided by num_one and assign the value to a variable remainder
10. Calculate num_one to the power of num_two and assign the value to a variable exp
11. Find floor division of num_one by num_two and assign the value to a variable floor_division
12. The radius of a circle is 30 meters.
1. Calculate the area of a circle and assign the value to a variable name of _area_of_circle_
2. Calculate the circumference of a circle and assign the value to a variable name of _circum_of_circle_
3. Take radius as user input and calculate the area.
1. Use the built-in input function to get first name, last name, country and age from a user and store the value to their corresponding variable names
1. Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords
13. Use the built-in input function to get first name, last name, country and age from a user and store the value to their corresponding variable names
14. Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords

🎉 CONGRATULATIONS ! 🎉

Expand Down
12 changes: 6 additions & 6 deletions 02_Day_Variables_builtin_functions/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
is_married = True
skills = ['HTML', 'CSS', 'JS', 'React', 'Python']
person_info = {
'firstname':'Asabeneh',
'lastname':'Yetayeh',
'country':'Finland',
'city':'Helsinki'
}
'firstname': 'Asabeneh',
'lastname': 'Yetayeh',
'country': 'Finland',
'city': 'Helsinki'
}

# Printing the values stored in the variables

Expand All @@ -37,4 +37,4 @@
print('Last name: ', last_name)
print('Country: ', country)
print('Age: ', age)
print('Married: ', is_married)
print('Married: ', is_married)
13 changes: 7 additions & 6 deletions 03_Day_Operators/03_operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ print('Division: ', 7 / 2) # 3.5
print('Division without the remainder: ', 7 // 2) # 3, gives without the floating number or without the remaining
print ('Division without the remainder: ',7 // 3) # 2
print('Modulus: ', 3 % 2) # 1, Gives the remainder
print('Exponentiation: ', 2 ** 3) # 9 it means 2 * 2 * 2
print('Exponentiation: ', 2 ** 3) # 8 it means 2 * 2 * 2
```

**Example:Floats**
Expand Down Expand Up @@ -121,7 +121,7 @@ print('a * b = ', product)
print('a / b = ', division)
print('a % b = ', remainder)
print('a // b = ', floor_division)
print('a ** b = ', exponentiation)
print('a ** b = ', exponential)
```

**Example:**
Expand All @@ -148,7 +148,7 @@ print('division: ', div)
print('remainder: ', remainder)
```

Let us start start connecting the dots and start making use of what we already know to calculate (area, volume,density, weight, perimeter, distance, force).
Let us start connecting the dots and start making use of what we already know to calculate (area, volume,density, weight, perimeter, distance, force).

**Example:**

Expand All @@ -174,6 +174,7 @@ print(weight, 'N') # Adding unit to the weight
mass = 75 # in Kg
volume = 0.075 # in cubic meter
density = mass / volume # 1000 Kg/m^3
print(density, 'Kg/m^3') # Adding unit to the density

```

Expand Down Expand Up @@ -213,13 +214,13 @@ In addition to the above comparison operator Python uses:
- _is_: Returns true if both variables are the same object(x is y)
- _is not_: Returns true if both variables are not the same object(x is not y)
- _in_: Returns True if the queried list contains a certain item(x in y)
- _not in_: Returns True if the queried list doesn't have a certain item(x in y)
- _not in_: Returns True if the queried list doesn't have a certain item(x not in y)

```py
print('1 is 1', 1 is 1) # True - because the data values are the same
print('1 is not 2', 1 is not 2) # True - because 1 is not 2
print('A in Asabeneh', 'A' in 'Asabeneh') # True - A found in the string
print('B in Asabeneh', 'B' in 'Asabeneh') # False - there is no uppercase B
print('B not in Asabeneh', 'B' in 'Asabeneh') # False - there is no uppercase B
print('coding' in 'coding for all') # True - because coding for all has the word coding
print('a in an:', 'a' in 'an') # True
print('4 is 2 ** 2:', 4 is 2 ** 2) # True
Expand Down Expand Up @@ -287,7 +288,7 @@ The perimeter of the triangle is 12
18. Check if the floor division of 7 by 3 is equal to the int converted value of 2.7.
19. Check if type of '10' is equal to type of 10
20. Check if int('9.8') is equal to 10
21. Writ a script that prompts the user to enter hours and rate per hour. Calculate pay of the person?
21. Write a script that prompts the user to enter hours and rate per hour. Calculate pay of the person?

```py
Enter hours: 40
Expand Down
41 changes: 23 additions & 18 deletions 03_Day_Operators/day-3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,28 @@
print('Addition: ', 1 + 2)
print('Subtraction: ', 2 - 1)
print('Multiplication: ', 2 * 3)
print ('Division: ', 4 / 2) # Division in python gives floating number
# Division in python gives floating number
print('Division: ', 4 / 2)
print('Division: ', 6 / 2)
print('Division: ', 7 / 2)
print('Division without the remainder: ', 7 // 2) # gives without the floating number or without the remaining
# gives without the floating number or without the remaining
print('Division without the remainder: ', 7 // 2)
print('Modulus: ', 3 % 2) # Gives the remainder
print ('Division without the remainder: ', 7 // 3)
print('Division without the remainder: ', 7 // 3)
print('Exponential: ', 3 ** 2) # it means 3 * 3

# Floating numbers
print('Floating Number,PI', 3.14)
print('Floating Number, gravity', 9.81)

# Complex numbers
print('Complex number: ', 1 + 1j)
print('Multiplying complex number: ',(1 + 1j) * (1-1j))
print('Complex number: ', 1+1j)
print('Multiplying complex number: ', (1+1j) * (1-1j))

# Declaring the variable at the top first

a = 3 # a is a variable name and 3 is an integer data type
b = 2 # b is a variable name and 3 is an integer data type
a = 3 # a is a variable name and 3 is an integer data type
b = 2 # b is a variable name and 3 is an integer data type

# Arithmetic operations and assigning the result to a variable
total = a + b
Expand All @@ -35,7 +37,7 @@
exponential = a ** b

# I should have used sum instead of total but sum is a built-in function try to avoid overriding builtin functions
print(total) # if you don't label your print with some string, you never know from where is the result is coming
print(total) # if you don't label your print with some string, you never know from where is the result is coming
print('a + b = ', total)
print('a - b = ', diff)
print('a * b = ', product)
Expand Down Expand Up @@ -65,7 +67,8 @@

# Calculating area of a circle
radius = 10 # radius of a circle
area_of_circle = 3.14 * radius ** 2 # two * sign means exponent or power
# two * sign means exponent or power
area_of_circle = 3.14 * radius ** 2
print('Area of a circle:', area_of_circle)

# Calculating area of a rectangle
Expand Down Expand Up @@ -102,23 +105,25 @@
print('True and True: ', True and True)
print('True or False:', True or False)

# Another way comparison
print('1 is 1', 1 is 1) # True - because the data values are the same
# Another way comparison
# True - because the data values are the same
print('1 is 1', 1 is 1)
print('1 is not 2', 1 is not 2) # True - because 1 is not 2
print('A in Asabeneh', 'A' in 'Asabeneh') # True - A found in the string
print('B in Asabeneh', 'B' in 'Asabeneh') # False -there is no uppercase B
print('coding' in 'coding for all') # True - because coding for all has the word coding
print('A in Asabeneh', 'A' in 'Asabeneh') # True - A found in the string
print('B in Asabeneh', 'B' in 'Asabeneh') # False -there is no uppercase B
# True - because coding for all has the word coding
print('coding' in 'coding for all')
print('a in an:', 'a' in 'an') # True
print('4 is 2 ** 2:', 4 is 2 ** 2) # True

print(3 > 2 and 4 > 3) # True - because both statements are true
print(3 > 2 and 4 < 3) # False - because the second statement is false
print(3 < 2 and 4 < 3) # False - because both statements are false
print(3 > 2 and 4 > 3) # True - because both statements are true
print(3 > 2 and 4 < 3) # False - because the second statement is false
print(3 < 2 and 4 < 3) # False - because both statements are false
print(3 > 2 or 4 > 3) # True - because both statements are true
print(3 > 2 or 4 < 3) # True - because one of the statement is true
print(3 < 2 or 4 < 3) # False - because both statements are false
print(not 3 > 2) # False - because 3 > 2 is true, then not True gives False
print(not True) # False - Negation, the not operator turns true to false
print(not False) # True
print(not not True) # True
print(not not False) # False
print(not not False) # False
16 changes: 8 additions & 8 deletions 04_Day_Strings/04_strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ print(len(full_name)) # 16
In Python and other programming languages \ followed by a character is an escape sequence. Let us see the most common escape characters:

- \n: new line
- \t: Tab means(8 spaces)
- \t: Tab means(8 spaces)
- \\\\: Back slash
- \\': Single quote (')
- \\": Double quote (")
Expand All @@ -101,7 +101,7 @@ Now, let us see the use of the above escape sequences with examples.

```py
print('I hope everyone is enjoying the Python Challenge.\nAre you ?') # line break
print('Days\tTopics\tExercises') # adding tab space or 4 spaces
print('Days\tTopics\tExercises') # adding tab space or 4 spaces
print('Day 1\t5\t5')
print('Day 2\t6\t20')
print('Day 3\t5\t23')
Expand All @@ -112,7 +112,7 @@ print('In every programming language it starts with \"Hello, World!\"') # to wri
# output
I hope every one is enjoying the Python Challenge.
Are you ?
Days Topics Exercises
Days Topics Exercises
Day 1 5 5
Day 2 6 20
Day 3 5 23
Expand Down Expand Up @@ -154,7 +154,7 @@ print(formated_string) # "The following are python libraries:['Django', 'Flask',

#### New Style String Formatting (str.format)

This formatting is introduced in Python version 3.
This format was introduced in Python version 3.

```py

Expand Down Expand Up @@ -349,7 +349,7 @@ last_name = 'Yetayeh'
age = 250
job = 'teacher'
country = 'Finland'
sentence = 'I am {} {}. I am a {}. I am {} years old. I live in {}.'.format(first_name, last_name, age, job, country)
sentence = 'I am {} {}. I am a {}. I am {} years old. I live in {}.'.format(first_name, last_name, job, age, country)
print(sentence) # I am Asabeneh Yetayeh. I am 250 years old. I am a teacher. I live in Finland.

radius = 10
Expand Down Expand Up @@ -413,7 +413,7 @@ print(challenge.isdecimal()) # False
challenge = '123'
print(challenge.isdecimal()) # True
challenge = '\u00B2'
print(challenge.isdigit()) # False
print(challenge.isdigit()) # True
challenge = '12 3'
print(challenge.isdecimal()) # False, space not allowed
```
Expand Down Expand Up @@ -545,7 +545,7 @@ print(challenge.startswith('thirty')) # False
9. Cut(slice) out the first word of _Coding For All_ string.
10. Check if _Coding For All_ string contains a word Coding using the method index, find or other methods.
11. Replace the word coding in the string 'Coding For All' to Python.
12. Change Python for Everyone to Python for All using the replace method or other methods.
12. Change "Python for Everyone" to "Python for All" using the replace method or other methods.
13. Split the string 'Coding For All' using space as the separator (split()) .
14. "Facebook, Google, Microsoft, Apple, IBM, Oracle, Amazon" split the string at the comma.
15. What is the character at index 0 in the string _Coding For All_.
Expand All @@ -561,7 +561,7 @@ print(challenge.startswith('thirty')) # False
25. Slice out the phrase 'because because because' in the following sentence: 'You cannot end a sentence with because because because is a conjunction'
26. Find the position of the first occurrence of the word 'because' in the following sentence: 'You cannot end a sentence with because because because is a conjunction'
27. Slice out the phrase 'because because because' in the following sentence: 'You cannot end a sentence with because because because is a conjunction'
28. Does '\'Coding For All' start with a substring _Coding_?
28. Does 'Coding For All' start with a substring _Coding_?
29. Does 'Coding For All' end with a substring _coding_?
30. '&nbsp;&nbsp; Coding For All &nbsp;&nbsp;&nbsp; &nbsp;' &nbsp;, remove the left and right trailing spaces in the given string.
31. Which one of the following variables return True when we use the method isidentifier():
Expand Down
Loading