|
2 | 2 |
|
3 | 3 | :information_source: This repo contains questions and exercises to learn and practice Python
|
4 | 4 |
|
5 |
| -:bar_chart: There are currently **80** exercises and questions |
6 |
| - |
7 |
| -# Python Exercises |
8 |
| - |
| 5 | +:bar_chart: There are currently **77** exercises and questions |
| 6 | + |
| 7 | +* Exercises |
| 8 | + * [Hello World](#exercises-hello-world) |
| 9 | + * [Objects & Data Types](#exercises-objects) |
| 10 | + * [Variables](#exercises-variables) |
| 11 | + * [Booleans](#exercisese-booleans) |
| 12 | + * [Strings](#exercisese-strings) |
| 13 | + * [Numbers](#exercisese-numbers) |
| 14 | + * [Lists and Tuples](#exercisese-lists) |
| 15 | + * [Dictionaries](#exercises-dictionaries) |
| 16 | + * [Loops](#exercises-loops) |
| 17 | + * [Functions](#exercises-loops) |
| 18 | + * [Classes](#exercises-classes) |
| 19 | + * [OOP](#exercises-oop) |
| 20 | +* Questions |
| 21 | + * [Hello World](#questions-hello-world) |
| 22 | + * [Objects & Data Types](#questions-objects) |
| 23 | + * [Variables](#questions-variables) |
| 24 | + * [Booleans](#questions-booleans) |
| 25 | + * [Strings](#questions-strings) |
| 26 | + * [Numbers](#questions-numbers) |
| 27 | + * [Lists and Tuples](#questions-lists) |
| 28 | + * [Dictionaries](#questions-dictionaries) |
| 29 | + * [Loops](#questions-loops) |
| 30 | + * [Functions](#questions-loops) |
| 31 | + * [Classes](#questions-classes) |
| 32 | + * [OOP](#questions-oop) |
| 33 | + |
| 34 | +# Exercises |
| 35 | + |
| 36 | +<a name="exercises-hello-world"></a> |
9 | 37 | ## Hello World
|
10 | 38 |
|
11 | 39 | |Name|Objective & Instructions|Solution|Comments|
|
12 | 40 | |--------|--------|------|----|
|
13 |
| -| Hello World! | [Exercise](exercises/hello_world/hello_world.md) | | | |
| 41 | +| Hello World! | [Exercise](exercises/hello_world/hello_world.md) | Solution](solutions/hello_world/hello_world.md | | |
14 | 42 | | Python Characteristics | [Exercise](exercises/hello_world/python_characteristics.md) | [Solution](solutions/hello_world/python_characteristics.md) | |
|
15 | 43 | | What is the result? - Level 1 | [Exercise](exercises/hello_world/what_is_the_result_lvl_1.md) | [Solution](solutions/hello_world/what_is_the_result_lvl_1.md) | |
|
16 | 44 | | What is the result? - Level 2 | [Exercise](exercises/hello_world/what_is_the_result_lvl_2.md) | | |
|
17 | 45 |
|
| 46 | +<a name="exercises-objects"></a> |
18 | 47 | ## Objects & Data Types
|
19 | 48 |
|
20 | 49 | |Name|Objective & Instructions|Solution|Comments|
|
|
27 | 56 | | Strongly Typed | [Exercise](exercises/data_types/strongly_typed.md) | [Solution](solutions/data_types/strongly_typed.md) | |
|
28 | 57 | | Object Creation | [Exercise](exercises/data_types/object_creation.md) | [Solution](solutions/data_types/object_creation.md) | |
|
29 | 58 |
|
| 59 | +<a name="exercises-variables"></a> |
30 | 60 | ## Variables
|
31 | 61 |
|
32 | 62 | |Name|Objective & Instructions|Solution|Comments|
|
|
38 | 68 | | Copying Variables | [Exercise](exercises/variables/copying_variables.md) | [Solution](solutions/variables/copying_variables.md) | |
|
39 | 69 | | Mutable Objects | [Exercise](exercises/variables/mutable_objects.md) | [Solution](solutions/variables/mutable_objects.md) | |
|
40 | 70 |
|
| 71 | +<a name="exercises-booleans"></a> |
41 | 72 | ## Booleans
|
42 | 73 |
|
43 | 74 | |Name|Objective & Instructions|Solution|Comments|
|
44 | 75 | |--------|--------|------|----|
|
45 | 76 | | True or False? | [Exercise](exercises/booleans/true_or_false.md) | [Solution](solutions/booleans/true_or_false.md) | |
|
46 | 77 | | Conversion | [Exercise](exercises/booleans/conversion.md) | [Solution](solutions/booleans/conversion.md) | |
|
47 | 78 |
|
| 79 | +<a name="exercises-strings"></a> |
48 | 80 | ## Strings
|
49 | 81 |
|
50 | 82 | |Name|Objective & Instructions|Solution|Comments|
|
|
62 | 94 | | Slicing - Level 1 | [Exercise](exercises/strings/slicing_lvl_1.md) | [Solution](solutions/strings/slicing_lvl_1.md) | |
|
63 | 95 | | Slicing - Level 2 | [Exercise](exercises/strings/slicing_lvl_2.md) | [Solution](solutions/strings/slicing_lvl_2.md) | |
|
64 | 96 |
|
| 97 | +<a name="exercises-numbers"></a> |
65 | 98 | ## Numbers
|
66 | 99 |
|
67 | 100 | |Name|Objective & Instructions|Solution|Comments|
|
|
72 | 105 | | Bases | [Exercise](exercises/numbers/bases.md) | [Solution](solutions/numbers/bases.md) | |
|
73 | 106 | | Palindrome | [Exercise](exercises/numbers/palindrome.md) | [Solution](solutions/numbers/palindrome.md) | |
|
74 | 107 |
|
| 108 | +<a name="exercises-lists"></a> |
75 | 109 | ## Lists & Tuples
|
76 | 110 |
|
77 | 111 | |Name|Objective & Instructions|Solution|Comments|
|
|
85 | 119 | | What is the result? - Level 1 | [Exercise](exercises/lists/what_is_the_result_lvl_1.md) | [Solution](solutions/lists/what_is_the_result_lvl_1.md) | |
|
86 | 120 | | What is the result? - Level 2 | [Exercise](exercises/lists/what_is_the_result_lvl_2.md) | [Solution](solutions/lists/what_is_the_result_lvl_2.md) | |
|
87 | 121 |
|
| 122 | +<a name="exercises-dictionaries"></a> |
88 | 123 | ## Dictionaries
|
89 | 124 |
|
90 | 125 | |Name|Objective & Instructions|Solution|Comments|
|
91 | 126 | |--------|--------|------|----|
|
92 | 127 | | Facts Only | [Exercise](exercises/dicts/facts_only.md) | [Solution](solutions/dict/facts_only.md) | |
|
93 | 128 |
|
| 129 | +<a name="exercises-loops"></a> |
94 | 130 | ## Loops
|
95 | 131 |
|
96 | 132 | |Name|Objective & Instructions|Solution|Comments|
|
|
101 | 137 | | Stream of Numbers | [Exercise](exercises/loops/numbers_stream.md) | [Solution](solutions/loops/numbers_stream.md) | |
|
102 | 138 | | Refactor-1 | [Exercise](exercises/loops/refactor_1.md) | [Solution](solutions/loops/refactor_1.py) | |
|
103 | 139 |
|
| 140 | +<a name="exercises-functions"></a> |
104 | 141 | ## Functions
|
105 | 142 |
|
106 | 143 | |Name|Objective & Instructions|Solution|Comments|
|
|
109 | 146 | | Calculator | [Exercise](exercises/functions/calculator.md) | [Solution](solutions/functions/calculator.md) | |
|
110 | 147 | | First Class Objects | [Exercise](exercises/functions/first_class_objects.md) | [Solution](solutions/functions/first_class_objects.md) | |
|
111 | 148 |
|
112 |
| -## OOP |
| 149 | +<a name="exercises-classes"></a> |
| 150 | +## Classes |
113 | 151 |
|
114 | 152 | |Name|Objective & Instructions|Solution|Comments|
|
115 | 153 | |--------|--------|------|----|
|
116 |
| -| Inheritance | [Exercise](exercises/oop/inheritance.md) | [Solution](solutions/oop/inheritance.md) | | |
| 154 | +| Classes 101 | [Exercise](exercises/classes/101.md) | [Solution](solutions/classes/101.md) | | |
| 155 | +| Attributes | [Exercise](exercises/classes/attributes.md) | [Solution](solutions/classes/attributes.md) | | |
117 | 156 |
|
118 |
| -## Classes |
| 157 | +<a name="exercises-oop"></a> |
| 158 | +## OOP |
119 | 159 |
|
120 | 160 | |Name|Objective & Instructions|Solution|Comments|
|
121 | 161 | |--------|--------|------|----|
|
122 |
| -| Attributes | [Exercise](exercises/classes/attributes.md) | [Solution](solutions/classes/attributes.md) | | |
| 162 | +| Inheritance | [Exercise](exercises/oop/inheritance.md) | [Solution](solutions/oop/inheritance.md) | | |
123 | 163 |
|
124 | 164 | ## Magic Methods
|
125 | 165 |
|
|
186 | 226 | |--------|--------|------|----|
|
187 | 227 | | Random Number | [Exercise](exercises/misc/random_number.md) | | |
|
188 | 228 | | Random Item | [Exercise](exercises/misc/random_item.md) | | |
|
| 229 | + |
| 230 | +# Questions |
| 231 | + |
| 232 | +<a name="questions-hello-world"></a> |
| 233 | +## Hello World |
| 234 | + |
| 235 | +<details> |
| 236 | +<summary>How to print "Hello World"?</summary><br><b> |
| 237 | + |
| 238 | +`print("Hello World")` |
| 239 | +</b></details> |
| 240 | + |
| 241 | +<a name="questions-classes"></a> |
| 242 | +## Classes |
| 243 | + |
| 244 | +<details> |
| 245 | +<summary>Define a class that does nothing</summary><br><b> |
| 246 | + |
| 247 | +```python |
| 248 | +class SomeClass: |
| 249 | + pass |
| 250 | +``` |
| 251 | +</b></details> |
| 252 | + |
| 253 | +<details> |
| 254 | +<summary>True or False? If <code>c</code> is an instance of a class, then in <code>c.x = 1</code>, <code>x</code> is a variable of the value 1</summary><br><b> |
| 255 | + |
| 256 | +False. `x` is an attribute in the case `c.x = 1` |
| 257 | +</b></details> |
| 258 | + |
| 259 | +<details> |
| 260 | +<summary>True or False? Every object in Python has attributes</summary><br><b> |
| 261 | + |
| 262 | +True. You can think on attributes as private dictionaries but instead of accessing them with `[]` or `.get`, they are accessed by using a dot. |
| 263 | +</b></details> |
0 commit comments