Skip to content

Commit 0bbde44

Browse files
com
1 parent 707a984 commit 0bbde44

File tree

3 files changed

+102
-21
lines changed

3 files changed

+102
-21
lines changed

.ipynb_checkpoints/Python-Exercises-2-Intermediate-checkpoint.ipynb

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,64 @@
217217
},
218218
{
219219
"cell_type": "code",
220-
"execution_count": null,
220+
"execution_count": 2,
221221
"id": "8127086d",
222222
"metadata": {},
223+
"outputs": [
224+
{
225+
"data": {
226+
"text/plain": [
227+
"4"
228+
]
229+
},
230+
"execution_count": 2,
231+
"metadata": {},
232+
"output_type": "execute_result"
233+
}
234+
],
235+
"source": [
236+
"a = (1, 2, 43, True, 'dog')\n",
237+
"\n",
238+
"#check on what index 'dog' is located. a.index('dog')\n",
239+
"\n"
240+
]
241+
},
242+
{
243+
"cell_type": "code",
244+
"execution_count": 3,
245+
"id": "de7adbf1",
246+
"metadata": {},
247+
"outputs": [
248+
{
249+
"data": {
250+
"text/plain": [
251+
"7"
252+
]
253+
},
254+
"execution_count": 3,
255+
"metadata": {},
256+
"output_type": "execute_result"
257+
}
258+
],
259+
"source": [
260+
"a = ('dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat')\n",
261+
"\n",
262+
"# count how many dogs are there in this tuple. a.count('dog')\n",
263+
"\n"
264+
]
265+
},
266+
{
267+
"cell_type": "code",
268+
"execution_count": null,
269+
"id": "9d285d8b",
270+
"metadata": {},
223271
"outputs": [],
224272
"source": []
225273
}
226274
],
227275
"metadata": {
228276
"kernelspec": {
229-
"display_name": "Python 3 (ipykernel)",
277+
"display_name": "Python 3",
230278
"language": "python",
231279
"name": "python3"
232280
},
@@ -240,7 +288,7 @@
240288
"name": "python",
241289
"nbconvert_exporter": "python",
242290
"pygments_lexer": "ipython3",
243-
"version": "3.9.7"
291+
"version": "3.8.8"
244292
}
245293
},
246294
"nbformat": 4,

Python-Exercises-2-Intermediate.ipynb

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,64 @@
217217
},
218218
{
219219
"cell_type": "code",
220-
"execution_count": null,
220+
"execution_count": 2,
221221
"id": "8127086d",
222222
"metadata": {},
223+
"outputs": [
224+
{
225+
"data": {
226+
"text/plain": [
227+
"4"
228+
]
229+
},
230+
"execution_count": 2,
231+
"metadata": {},
232+
"output_type": "execute_result"
233+
}
234+
],
235+
"source": [
236+
"a = (1, 2, 43, True, 'dog')\n",
237+
"\n",
238+
"#check on what index 'dog' is located. a.index('dog')\n",
239+
"\n"
240+
]
241+
},
242+
{
243+
"cell_type": "code",
244+
"execution_count": 3,
245+
"id": "de7adbf1",
246+
"metadata": {},
247+
"outputs": [
248+
{
249+
"data": {
250+
"text/plain": [
251+
"7"
252+
]
253+
},
254+
"execution_count": 3,
255+
"metadata": {},
256+
"output_type": "execute_result"
257+
}
258+
],
259+
"source": [
260+
"a = ('dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat')\n",
261+
"\n",
262+
"# count how many dogs are there in this tuple. a.count('dog')\n",
263+
"\n"
264+
]
265+
},
266+
{
267+
"cell_type": "code",
268+
"execution_count": null,
269+
"id": "9d285d8b",
270+
"metadata": {},
223271
"outputs": [],
224272
"source": []
225273
}
226274
],
227275
"metadata": {
228276
"kernelspec": {
229-
"display_name": "Python 3 (ipykernel)",
277+
"display_name": "Python 3",
230278
"language": "python",
231279
"name": "python3"
232280
},
@@ -240,7 +288,7 @@
240288
"name": "python",
241289
"nbconvert_exporter": "python",
242290
"pygments_lexer": "ipython3",
243-
"version": "3.9.7"
291+
"version": "3.8.8"
244292
}
245293
},
246294
"nbformat": 4,

TUPLE @@@.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)