From 27ed01f6c73f472c4ca1588c83657d6910648529 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Thu, 29 Jun 2023 20:47:44 -0400 Subject: [PATCH 01/73] Add badge files for Python Ch. 7 & Ch. 8 --- assets/classes-and-objects.png | Bin 0 -> 349 bytes assets/modules.png | Bin 0 -> 293 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 assets/classes-and-objects.png create mode 100644 assets/modules.png diff --git a/assets/classes-and-objects.png b/assets/classes-and-objects.png new file mode 100644 index 0000000000000000000000000000000000000000..2662aa74c8c61ce40c59a318009ecb4c49e4ec66 GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^T<;+`&!ArY;~ z2@Ti&LsfA7w*OnzZgodqljrIKf!_ixu**rmGZo*@qp&kg6Kf>s8- z`TyfK3$9MPCQ#1?1Z~q@uSPsQ`a3G{#|@{X1I`Vs^Ht6~H<4jY@W5kIElhP9; z-Y7Qk6)bHnKkm2i!^fWzvOH@A9N1sjsk8IE6F4ySSK-f^>$m%XHt_Il46rlIOe|<) z(D{F;c1r;lGc$AI{Kd^jKU#vN^A7#7kTtMyZir|&{d`HoLP4etLISp-$CHB3H0(Zd zgpIA7!{x^=BLg5gTe~DWM4fKh1?- literal 0 HcmV?d00001 diff --git a/assets/modules.png b/assets/modules.png new file mode 100644 index 0000000000000000000000000000000000000000..655590a6949b097f4ff112f20d2c4501e36492a2 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}_dQ)4Ln2y} zQyiGHZt4BMcytA0UhLh&9lmoq#imVUiYV~BvuD$6rRJ-pF@a|SuNVG3f1p89sM(w) z;lYEMyG0@yF3*n&H~<0$)lAG@9z6d97KkiSO?fa?-byhb^k!@5p0#^ff1#wifCj*;b{EmYV0}ipUv9&Fn!F}N}!@3>Em-2~Ad=QZE zWmZ|v7*oj0yyFs^p1}h}gIR2DvJQp09eiyudJ0x796wuPzB0=(E#_00!Iq#ZvG%|N jUdD*~eb*8WI5RNxDy6S#SegN3F)(<#`njxgN@xNAAmwi; literal 0 HcmV?d00001 From 3492eebad940a80fc06fad45bad20941dbf68f02 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Thu, 29 Jun 2023 20:51:40 -0400 Subject: [PATCH 02/73] Add files via upload --- assets/badge_classes_and_objects.png | Bin 0 -> 349 bytes assets/badge_modules.png | Bin 0 -> 293 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 assets/badge_classes_and_objects.png create mode 100644 assets/badge_modules.png diff --git a/assets/badge_classes_and_objects.png b/assets/badge_classes_and_objects.png new file mode 100644 index 0000000000000000000000000000000000000000..2662aa74c8c61ce40c59a318009ecb4c49e4ec66 GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^T<;+`&!ArY;~ z2@Ti&LsfA7w*OnzZgodqljrIKf!_ixu**rmGZo*@qp&kg6Kf>s8- z`TyfK3$9MPCQ#1?1Z~q@uSPsQ`a3G{#|@{X1I`Vs^Ht6~H<4jY@W5kIElhP9; z-Y7Qk6)bHnKkm2i!^fWzvOH@A9N1sjsk8IE6F4ySSK-f^>$m%XHt_Il46rlIOe|<) z(D{F;c1r;lGc$AI{Kd^jKU#vN^A7#7kTtMyZir|&{d`HoLP4etLISp-$CHB3H0(Zd zgpIA7!{x^=BLg5gTe~DWM4fKh1?- literal 0 HcmV?d00001 diff --git a/assets/badge_modules.png b/assets/badge_modules.png new file mode 100644 index 0000000000000000000000000000000000000000..655590a6949b097f4ff112f20d2c4501e36492a2 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}_dQ)4Ln2y} zQyiGHZt4BMcytA0UhLh&9lmoq#imVUiYV~BvuD$6rRJ-pF@a|SuNVG3f1p89sM(w) z;lYEMyG0@yF3*n&H~<0$)lAG@9z6d97KkiSO?fa?-byhb^k!@5p0#^ff1#wifCj*;b{EmYV0}ipUv9&Fn!F}N}!@3>Em-2~Ad=QZE zWmZ|v7*oj0yyFs^p1}h}gIR2DvJQp09eiyudJ0x796wuPzB0=(E#_00!Iq#ZvG%|N jUdD*~eb*8WI5RNxDy6S#SegN3F)(<#`njxgN@xNAAmwi; literal 0 HcmV?d00001 From 277f887ad153f2f750892dd77008d17672445893 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Thu, 29 Jun 2023 20:52:06 -0400 Subject: [PATCH 03/73] Delete modules.png --- assets/modules.png | Bin 293 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 assets/modules.png diff --git a/assets/modules.png b/assets/modules.png deleted file mode 100644 index 655590a6949b097f4ff112f20d2c4501e36492a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}_dQ)4Ln2y} zQyiGHZt4BMcytA0UhLh&9lmoq#imVUiYV~BvuD$6rRJ-pF@a|SuNVG3f1p89sM(w) z;lYEMyG0@yF3*n&H~<0$)lAG@9z6d97KkiSO?fa?-byhb^k!@5p0#^ff1#wifCj*;b{EmYV0}ipUv9&Fn!F}N}!@3>Em-2~Ad=QZE zWmZ|v7*oj0yyFs^p1}h}gIR2DvJQp09eiyudJ0x796wuPzB0=(E#_00!Iq#ZvG%|N jUdD*~eb*8WI5RNxDy6S#SegN3F)(<#`njxgN@xNAAmwi; From 0fede117121995ba3a5f9ae31d1440070eb69518 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Thu, 29 Jun 2023 20:52:25 -0400 Subject: [PATCH 04/73] Delete classes-and-objects.png --- assets/classes-and-objects.png | Bin 349 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 assets/classes-and-objects.png diff --git a/assets/classes-and-objects.png b/assets/classes-and-objects.png deleted file mode 100644 index 2662aa74c8c61ce40c59a318009ecb4c49e4ec66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^T<;+`&!ArY;~ z2@Ti&LsfA7w*OnzZgodqljrIKf!_ixu**rmGZo*@qp&kg6Kf>s8- z`TyfK3$9MPCQ#1?1Z~q@uSPsQ`a3G{#|@{X1I`Vs^Ht6~H<4jY@W5kIElhP9; z-Y7Qk6)bHnKkm2i!^fWzvOH@A9N1sjsk8IE6F4ySSK-f^>$m%XHt_Il46rlIOe|<) z(D{F;c1r;lGc$AI{Kd^jKU#vN^A7#7kTtMyZir|&{d`HoLP4etLISp-$CHB3H0(Zd zgpIA7!{x^=BLg5gTe~DWM4fKh1?- From fe060d9b89269a8b29574ebeef2789f0543df357 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Thu, 29 Jun 2023 20:59:37 -0400 Subject: [PATCH 05/73] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 7d33798..3e7b257 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,24 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H - [`stonks.py`](https://github.com/codedex-io/python-101/blob/main/6-functions/32_stonks.py) - [`drive_thru.py`](https://github.com/codedex-io/python-101/blob/main/6-functions/33_drive_thru.py) +## Classes & Objects + +- [`restaurants.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/34_restaurants.py) +- [`bobs_burgers.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/35_bobs_burgers.py) +- [`favorite_cities.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/36_favorite_cities.py) +- [`bank_accounts.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/37_bank_accounts.py) +- [`pokedex.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/38_pokedex.py) + +## Modules + +- [`slot_machine.py`](https://github.com/codedex-io/python-101/blob/main/8-modules/39_slot_machine_1.py) (solution 1) +- [`slot_machine.py`](https://github.com/codedex-io/python-101/blob/main/8-modules/39_slot_machine_2.py) (solution 2) +- [`solar_system.py`](https://github.com/codedex-io/python-101/blob/main/8-modules/40_solar_system.py) +- [`bday_messages.py`](https://github.com/codedex-io/python-101/blob/main/8-modules/41_bday_messages.py) (for exercise 41) +- [`main.py`](https://github.com/codedex-io/python-101/blob/main/8-modules/41_main.py) (for exercise 41) +- [`forty_two.py`](https://github.com/codedex-io/python-101/blob/main/8-modules/42_forty_two.py) +- [`zen.py`](https://github.com/codedex-io/python-101/blob/main/8-modules/43_zen.py) + --- Make sure to join the [Codédex Club or Workshops](https://www.codedex.io/community) for more problems! 💖 From 1a2a82e4b6b2baf83abd20a7271d5586f2f82f3a Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Thu, 29 Jun 2023 22:05:06 -0400 Subject: [PATCH 06/73] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e7b257..09b0178 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H - [`quadratic.py`](https://github.com/codedex-io/python-101/blob/main/2-variables/09_quadratic.py) - [`currency.py`](https://github.com/codedex-io/python-101/blob/main/2-variables/10_currency.py) -## Control Flow +## Control Flow - [`coin_flip.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/11_coin_flip.py) - [`grades.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/12_grades.py) @@ -41,7 +41,7 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H - [`99_bottles.py`](https://github.com/codedex-io/python-101/blob/main/4-loops/20_99_bottles.py) - [`fizz_buzz.py`](https://github.com/codedex-io/python-101/blob/main/4-loops/21_fizz_buzz.py) -## Lists +## Lists - [`grocery.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/22_grocery.py) - [`todo.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/23_todo.py) @@ -60,7 +60,7 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H - [`stonks.py`](https://github.com/codedex-io/python-101/blob/main/6-functions/32_stonks.py) - [`drive_thru.py`](https://github.com/codedex-io/python-101/blob/main/6-functions/33_drive_thru.py) -## Classes & Objects +## Classes & Objects - [`restaurants.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/34_restaurants.py) - [`bobs_burgers.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/35_bobs_burgers.py) From 9202e662e775eee0ce60da192b777d0f9cbd320e Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Mon, 3 Jul 2023 08:53:53 -0400 Subject: [PATCH 07/73] Update 32_stonks.py --- 6-functions/32_stonks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/6-functions/32_stonks.py b/6-functions/32_stonks.py index b300b9b..7290ebc 100644 --- a/6-functions/32_stonks.py +++ b/6-functions/32_stonks.py @@ -8,13 +8,13 @@ def price_at(i): def max_price(a, b): mx = 0 - for i in range(a, b): + for i in range(a, b + 1): mx = max(mx, price_at(i)) return mx def min_price(a, b): mn = price_at(a) - for i in range(a, b): + for i in range(a, b + 1): mn = min(mn, price_at(i)) return mn From 03a4d33fff189a696e36006db066298d6beb31bd Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Tue, 11 Jul 2023 14:27:54 -0400 Subject: [PATCH 08/73] Update 15_the_cyclone_1.py --- 3-control-flow/15_the_cyclone_1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3-control-flow/15_the_cyclone_1.py b/3-control-flow/15_the_cyclone_1.py index 44fa81d..fadabd1 100644 --- a/3-control-flow/15_the_cyclone_1.py +++ b/3-control-flow/15_the_cyclone_1.py @@ -6,9 +6,9 @@ if height >= 137 and credits >= 10: print("Enjoy the ride!") -elif height < 137: +elif height < 137 and credits >= 10: print("You are not tall enough to ride.") -elif credits < 10: +elif credits < 10 and height >= 137: print("You don't have enough credits to ride.") else: - print("Invalid data.") + print("You are not tall enough for this ride, nor do you have enough credits.") From a5d8db4af31dbf94c4cbabf0dc1dc7a88b5b0a74 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Tue, 11 Jul 2023 14:49:40 -0400 Subject: [PATCH 09/73] Create 15_the_cyclone_2.py --- 3-control-flow/15_the_cyclone_2.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 3-control-flow/15_the_cyclone_2.py diff --git a/3-control-flow/15_the_cyclone_2.py b/3-control-flow/15_the_cyclone_2.py new file mode 100644 index 0000000..5b2be3d --- /dev/null +++ b/3-control-flow/15_the_cyclone_2.py @@ -0,0 +1,17 @@ +# The Cyclone 🎢 +# Codédex + +is_open = False + +height = int(input('What is your height (cm)? ')) +credits = int(input('How many credits do you have? ')) + +not_tall_enough = height < 137 and credits >= 10 +not_enough_credits = credits < 10 and height >= 137 + +if not is_open: + print("Sorry! The ride is currently closed!") +elif not_tall_enough or not_enough_credits: + print("You are either not tall enough to ride or you don't have enough credits.") +else: + print("Enjoy the ride!") From d117c234319578e52796e1ec9b3e26dcbf3a6051 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Tue, 11 Jul 2023 14:51:16 -0400 Subject: [PATCH 10/73] Update 15_the_cyclone_2.py --- 3-control-flow/15_the_cyclone_2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3-control-flow/15_the_cyclone_2.py b/3-control-flow/15_the_cyclone_2.py index 5b2be3d..4999c2e 100644 --- a/3-control-flow/15_the_cyclone_2.py +++ b/3-control-flow/15_the_cyclone_2.py @@ -1,7 +1,7 @@ # The Cyclone 🎢 # Codédex -is_open = False +is_open = True height = int(input('What is your height (cm)? ')) credits = int(input('How many credits do you have? ')) From a7c4f914da898f7d072cd251f0d55386c68e68eb Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Tue, 25 Jul 2023 17:05:07 -0400 Subject: [PATCH 11/73] Update .gitignore --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index 22212bc..e4f969f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,3 @@ *.air *.ipa *.apk - -# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` -# should NOT be excluded as they contain compiler settings and other important -# information for Eclipse / Flash Builder. From c43df892aa20ac78429ccde9b509e92581808c28 Mon Sep 17 00:00:00 2001 From: b321gonzo Date: Tue, 25 Jul 2023 16:33:47 -0500 Subject: [PATCH 12/73] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09b0178..6c3fc75 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
-Welcome to The Legend of Python GitHub repo! We are super excited to have you. Here, you will find all the solutions to the Codédex challenges. Feel free to make pull requests to add your own twists on the challenges! +Welcome to The Legend of Python GitHub repo! We are super excited to have you. Here, you will find all the solutions to the Codédex exercises. Feel free to make pull requests to add your own twists on the exercises! ### Website: www.codedex.io From ba922d0e21ddac5dcc841a2e940d3390a6e53502 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Wed, 26 Jul 2023 09:16:54 -0400 Subject: [PATCH 13/73] Update 15_the_cyclone_2.py --- 3-control-flow/15_the_cyclone_2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3-control-flow/15_the_cyclone_2.py b/3-control-flow/15_the_cyclone_2.py index 4999c2e..2f270cd 100644 --- a/3-control-flow/15_the_cyclone_2.py +++ b/3-control-flow/15_the_cyclone_2.py @@ -6,12 +6,12 @@ height = int(input('What is your height (cm)? ')) credits = int(input('How many credits do you have? ')) -not_tall_enough = height < 137 and credits >= 10 -not_enough_credits = credits < 10 and height >= 137 +tall_enough = height >= 137 +not_enough_credits = credits < 10 if not is_open: print("Sorry! The ride is currently closed!") -elif not_tall_enough or not_enough_credits: +elif not tall_enough or not_enough_credits: print("You are either not tall enough to ride or you don't have enough credits.") else: print("Enjoy the ride!") From d55e52e8bea0f6da054c87e23c3e2c517efb1a30 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Wed, 26 Jul 2023 09:31:09 -0400 Subject: [PATCH 14/73] Update 15_the_cyclone_2.py --- 3-control-flow/15_the_cyclone_2.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/3-control-flow/15_the_cyclone_2.py b/3-control-flow/15_the_cyclone_2.py index 2f270cd..7a79377 100644 --- a/3-control-flow/15_the_cyclone_2.py +++ b/3-control-flow/15_the_cyclone_2.py @@ -1,17 +1,17 @@ # The Cyclone 🎢 # Codédex -is_open = True +ride_is_open = True height = int(input('What is your height (cm)? ')) credits = int(input('How many credits do you have? ')) tall_enough = height >= 137 -not_enough_credits = credits < 10 +enough_credits = credits >= 10 -if not is_open: - print("Sorry! The ride is currently closed!") -elif not tall_enough or not_enough_credits: +if ride_is_open and tall_enough and enough_credits: + print("Enjoy the ride!") +elif not tall_enough or not enough_credits: print("You are either not tall enough to ride or you don't have enough credits.") else: - print("Enjoy the ride!") + print("Sorry! The ride is currently closed!") From fe8388a9c5315fafbc48569ab518760d3e0925d3 Mon Sep 17 00:00:00 2001 From: Brandon Dusch Date: Thu, 3 Aug 2023 09:46:07 -0400 Subject: [PATCH 15/73] Update 10_currency.py --- 2-variables/10_currency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-variables/10_currency.py b/2-variables/10_currency.py index 8c9f78b..bb949a1 100644 --- a/2-variables/10_currency.py +++ b/2-variables/10_currency.py @@ -5,6 +5,6 @@ soles = int(input('What do you have left in soles? ')) reais = int(input('What do you have left in reais? ')) -total = pesos * 0.058 + soles * 0.28 + reais * 0.21 +total = pesos * 0.00025 + soles * 0.28 + reais * 0.21 print(total) From 9e5d0182d333002f9dfe62835242dfbece2ef2f0 Mon Sep 17 00:00:00 2001 From: Dusch4593 Date: Wed, 9 Aug 2023 10:23:04 -0400 Subject: [PATCH 16/73] combine both files for exercise 41 into one file --- 8-modules/41_bday_messages.py | 13 ++++++++++++- 8-modules/41_main.py | 16 ---------------- 2 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 8-modules/41_main.py diff --git a/8-modules/41_bday_messages.py b/8-modules/41_bday_messages.py index b0667fd..29a3525 100644 --- a/8-modules/41_bday_messages.py +++ b/8-modules/41_bday_messages.py @@ -1,7 +1,7 @@ # Countdown 🎂 # Codédex -import random +import random, datetime bday_messages = [ 'Hope you have a very Happy Birthday! 🎈', @@ -12,3 +12,14 @@ ] random_message = random.choice(bday_messages) + +today = datetime.date.today() + +my_next_birthday = datetime.date(2023, 4, 5) + +days_away = my_next_birthday - today + +if my_next_birthday == today: + print(bday_messages.random_message) +else: + print(f'My next birthday is {days_away.days} days away!') diff --git a/8-modules/41_main.py b/8-modules/41_main.py deleted file mode 100644 index 389d894..0000000 --- a/8-modules/41_main.py +++ /dev/null @@ -1,16 +0,0 @@ -# Birthday Card 🎂 -# Codédex - -import datetime -import bday_messages - -today = datetime.date.today() - -my_next_birthday = datetime.date(2023, 4, 5) - -days_away = my_next_birthday - today - -if my_next_birthday == today: - print(bday_messages.random_message) -else: - print(f'My next birthday is {days_away.days} days away!') From 00968bf27d206a917ec2625637f467681cd7ef9b Mon Sep 17 00:00:00 2001 From: Dusch4593 Date: Wed, 9 Aug 2023 10:27:53 -0400 Subject: [PATCH 17/73] rename solution file for exercise #41 --- 8-modules/{41_bday_messages.py => 41_countdown.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 8-modules/{41_bday_messages.py => 41_countdown.py} (100%) diff --git a/8-modules/41_bday_messages.py b/8-modules/41_countdown.py similarity index 100% rename from 8-modules/41_bday_messages.py rename to 8-modules/41_countdown.py From 78cc46136e96fb1e525af34a579a6c111cfcf674 Mon Sep 17 00:00:00 2001 From: Dusch4593 Date: Wed, 9 Aug 2023 12:24:14 -0400 Subject: [PATCH 18/73] bring back main.py and bday_message.py files --- .../{41_countdown.py => 41_bday_messages.py} | 15 ++------------- 8-modules/41_main.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 13 deletions(-) rename 8-modules/{41_countdown.py => 41_bday_messages.py} (52%) create mode 100644 8-modules/41_main.py diff --git a/8-modules/41_countdown.py b/8-modules/41_bday_messages.py similarity index 52% rename from 8-modules/41_countdown.py rename to 8-modules/41_bday_messages.py index 29a3525..02659fb 100644 --- a/8-modules/41_countdown.py +++ b/8-modules/41_bday_messages.py @@ -1,7 +1,7 @@ # Countdown 🎂 # Codédex -import random, datetime +import random bday_messages = [ 'Hope you have a very Happy Birthday! 🎈', @@ -11,15 +11,4 @@ 'Another year of you going around the sun! 🌞' ] -random_message = random.choice(bday_messages) - -today = datetime.date.today() - -my_next_birthday = datetime.date(2023, 4, 5) - -days_away = my_next_birthday - today - -if my_next_birthday == today: - print(bday_messages.random_message) -else: - print(f'My next birthday is {days_away.days} days away!') +random_message = random.choice(bday_messages) \ No newline at end of file diff --git a/8-modules/41_main.py b/8-modules/41_main.py new file mode 100644 index 0000000..42cd469 --- /dev/null +++ b/8-modules/41_main.py @@ -0,0 +1,15 @@ +# Countdown 🎂 +# Codédex + +import datetime, bday_messages + +today = datetime.date.today() + +my_next_birthday = datetime.date(2023, 4, 5) + +days_away = my_next_birthday - today + +if my_next_birthday == today: + print(bday_messages.random_message) +else: + print(f'My next birthday is {days_away.days} days away!') From 79acb943c716ffffe9e1e3123b785dbcf88a4719 Mon Sep 17 00:00:00 2001 From: Dusch4593 Date: Mon, 20 Nov 2023 09:48:57 -0500 Subject: [PATCH 19/73] add second solution for Pokemon exercise --- 7-classes-objects/38_pokedex.py | 41 ----------------------------- 7-classes-objects/38_pokedex_1.py | 39 ++++++++++++++++++++++++++++ 7-classes-objects/38_pokedex_2.py | 43 +++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 41 deletions(-) delete mode 100644 7-classes-objects/38_pokedex.py create mode 100644 7-classes-objects/38_pokedex_1.py create mode 100644 7-classes-objects/38_pokedex_2.py diff --git a/7-classes-objects/38_pokedex.py b/7-classes-objects/38_pokedex.py deleted file mode 100644 index efe04f2..0000000 --- a/7-classes-objects/38_pokedex.py +++ /dev/null @@ -1,41 +0,0 @@ -# Pokédex 📟 -# Codédex - -# Class definition -class Pokemon: - def __init__(self, name, type, description, level, region, is_caught): - self.name = name - self.type = type - self.description = description - self.level = level - self.region = region - self.is_caught = is_caught - - # Instance method - def speak(self): - print(self.name + ' made a sound!') - - # Instance method - def display_details(self): - print('Name: ' + self.name) - - if len(self.type) == 1: - print('Type: ' + self.type[0]) - else: - print('Type: ' + self.type[0] + '/' + self.type[1]) - - print('Lv. ' + str(self.level)) - print('Region: ' + self.region) - print('Description: ' + self.description) - - if self.is_caught: - print(self.name + ' has already been caught!') - else: - print(self.name + ' hasn\'t been caught yet.') - -# Pokémon objects -pikachu = Pokemon("Pikachu", ["Electric"], " It has small electric sacs on both its cheeks. If threatened, it looses electric charges from the sacs.", 25, "Kanto", True) - -charizard = Pokemon("Charizard", ["Fire", "Flying"], " It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.", 36, "Kanto", False) - -gyarados = Pokemon("Gyarados", ["Water", "Flying"], "It has an extremely aggressive nature. The HYPER BEAM it shoots from its mouth totally incinerates all targets.", 57, "Kanto", False) diff --git a/7-classes-objects/38_pokedex_1.py b/7-classes-objects/38_pokedex_1.py new file mode 100644 index 0000000..6b533ee --- /dev/null +++ b/7-classes-objects/38_pokedex_1.py @@ -0,0 +1,39 @@ +# Pokédex 📟 +# Codédex + +# Class definition +class Pokemon: + def __init__(self, entry, name, types, description, is_caught): + self.entry = entry + self.name = name + self.types = types + self.description = description + self.is_caught = is_caught + + def speak(self): + print(self.name + ', ' + self.name + '!') + + def display_details(self): + print('Entry Number: ' + str(self.entry)) + print('Name: ' + self.name) + + if len(self.types) == 1: + print('Type: ' + self.types[0]) + else: + print('Type: ' + self.types[0] + '/' + self.types[1]) + + print('Description: ' + self.description) + + if self.is_caught: + print(self.name + ' has already been caught!') + else: + print(self.name + ' hasn\'t been caught yet.') + +# Pokémon objects +pikachu = Pokemon(25, 'Pikachu', ['Electric'], 'It has small electric sacs on both its cheeks. If threatened, it looses electric charges from the sacs.', True) +charizard = Pokemon(3, 'Charizard', ['Fire', 'Flying'], 'It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.', False) +gyarados = Pokemon(130, 'Gyarados', ['Water', 'Flying'], 'It has an extremely aggressive nature. The HYPER BEAM it shoots from its mouth totally incinerates all targets.', False) + +pikachu.speak() +charizard.speak() +gyarados.speak() \ No newline at end of file diff --git a/7-classes-objects/38_pokedex_2.py b/7-classes-objects/38_pokedex_2.py new file mode 100644 index 0000000..b483644 --- /dev/null +++ b/7-classes-objects/38_pokedex_2.py @@ -0,0 +1,43 @@ +# Pokédex 📟 +# Codédex + +# Class definition +class Pokemon: + def __init__(self, entry, name, types, description, level, region, is_caught): + self.entry = entry + self.name = name + self.types = types + self.description = description + self.level = level + self.region = region + self.is_caught = is_caught + + def speak(self): + print(self.name + ', ' + self.name + '!') + + def display_details(self): + print('Entry Number: ' + str(self.entry)) + print('Name: ' + self.name) + + if len(self.types) == 1: + print('Type: ' + self.types[0]) + else: + print('Type: ' + self.types[0] + '/' + self.types[1]) + + print('Lv. ' + str(self.level)) + print('Region: ' + self.region) + print('Description: ' + self.description) + + if self.is_caught: + print(self.name + ' has already been caught!') + else: + print(self.name + ' hasn\'t been caught yet.') + +# Pokémon objects +pikachu = Pokemon(25, 'Pikachu', ['Electric'], 'It has small electric sacs on both its cheeks. If threatened, it looses electric charges from the sacs.', 25, 'Kanto', True) +charizard = Pokemon(3, 'Charizard', ['Fire', 'Flying'], 'It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.', 36, 'Kanto', False) +gyarados = Pokemon(130, 'Gyarados', ['Water', 'Flying'], 'It has an extremely aggressive nature. The HYPER BEAM it shoots from its mouth totally incinerates all targets.', 57, 'Kanto', False) + +pikachu.speak() +charizard.speak() +gyarados.speak() \ No newline at end of file From 500215cfc547b913c6b58bcbfdd640b7acac4aa5 Mon Sep 17 00:00:00 2001 From: Dusch4593 Date: Sat, 6 Jan 2024 18:22:27 -0500 Subject: [PATCH 20/73] update Magic 8 Ball solution --- 3-control-flow/14_magic_8_ball.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3-control-flow/14_magic_8_ball.py b/3-control-flow/14_magic_8_ball.py index 539b5f4..291704e 100644 --- a/3-control-flow/14_magic_8_ball.py +++ b/3-control-flow/14_magic_8_ball.py @@ -3,7 +3,7 @@ import random -question = input() +question = input('Question: ') random_number = random.randint(1, 9) From 444e49ab4d44aaabe041e1e87f3eacbe2bc2f639 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 24 Jan 2024 09:07:42 -0500 Subject: [PATCH 21/73] Update 20_99_bottles.py --- 4-loops/20_99_bottles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4-loops/20_99_bottles.py b/4-loops/20_99_bottles.py index 428f671..38d7eb3 100644 --- a/4-loops/20_99_bottles.py +++ b/4-loops/20_99_bottles.py @@ -4,5 +4,5 @@ for i in range(99, 0, -1): print(f'{i} bottles of beer on the wall') print(f'{i} bottles of beer') - print('take one down pass it around') + print('Take one down, pass it around') print(f'{i-1} bottles of beer on the wall') From 6190b67907273b2d9b4a6aeaa9b886708478edd5 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 24 Jan 2024 09:18:18 -0500 Subject: [PATCH 22/73] Update 14_magic_8_ball.py --- 3-control-flow/14_magic_8_ball.py | 1 - 1 file changed, 1 deletion(-) diff --git a/3-control-flow/14_magic_8_ball.py b/3-control-flow/14_magic_8_ball.py index 291704e..8a620d2 100644 --- a/3-control-flow/14_magic_8_ball.py +++ b/3-control-flow/14_magic_8_ball.py @@ -28,5 +28,4 @@ else: answer = 'Error' -print('Question: ' + question) print('Magic 8 Ball: ' + answer) From 80139a370660a2113fc71e3a6753d864febb20f4 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Sat, 13 Apr 2024 20:42:10 -0400 Subject: [PATCH 23/73] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c3fc75..9399c6a 100644 --- a/README.md +++ b/README.md @@ -80,4 +80,4 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H --- -Make sure to join the [Codédex Club or Workshops](https://www.codedex.io/community) for more problems! 💖 +Make sure to join the [community](https://www.codedex.io/community) and [Codédex Club](https://www.codedex.io/pricing) for more content! 💖 From 6abd8ae7b5a42fc1bacff3262b27b87088ad7c9a Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Sat, 13 Apr 2024 23:14:54 -0400 Subject: [PATCH 24/73] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9399c6a..fad5185 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. Here, you will find all the solutions to the Codédex exercises. Feel free to make pull requests to add your own twists on the exercises! -### Website: www.codedex.io +### Website: www.codedex.io/python ## Hello World From 5ec5b285737bd26666d75098b6202c07a5f3374b Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 2 Oct 2024 00:17:08 -0400 Subject: [PATCH 25/73] Update 27_bucket_list.py --- 5-lists/27_bucket_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-lists/27_bucket_list.py b/5-lists/27_bucket_list.py index ea7fae1..0c4e2f8 100644 --- a/5-lists/27_bucket_list.py +++ b/5-lists/27_bucket_list.py @@ -1,4 +1,4 @@ -# Bucket List: Jerry Zhu +# Bucket List 🪣 # Codédex things_to_do = [ From a6fc99aa09e70b5f770e8965f2bee108fc7023b1 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Thu, 3 Oct 2024 00:35:57 -0400 Subject: [PATCH 26/73] Update 32_stonks.py --- 6-functions/32_stonks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/6-functions/32_stonks.py b/6-functions/32_stonks.py index 7290ebc..d2ba9d6 100644 --- a/6-functions/32_stonks.py +++ b/6-functions/32_stonks.py @@ -1,7 +1,7 @@ # Stonks 📈 # Codédex -stock_prices = [ 6.15, 5.81, 5.70, 5.65, 5.33, 5.62, 5.19, 6.13, 7.20, 7.34, 7.95, 7.53, 7.39, 7.59, 7.27 ] +stock_prices = [34.68, 36.09, 34.94, 33.97, 34.68, 35.82, 43.41, 44.29, 44.65, 53.56, 49.85, 48.71, 48.71, 49.94, 48.53, 47.03, 46.59, 48.62, 44.21, 47.21] def price_at(i): return stock_prices[i-1] From f304d4b1c5f1d108f19ebd5ad3d073a59298734c Mon Sep 17 00:00:00 2001 From: Jakub Sova Date: Thu, 10 Oct 2024 18:03:34 +0200 Subject: [PATCH 27/73] fix: link (Ch. 3 Exercise 15) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fad5185..39249a4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,8 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H - [`grades.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/12_grades.py) - [`ph_levels.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/13_ph_levels.py) - [`magic_8_ball.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/14_magic_8_ball.py) -- [`the_cyclone.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/15_the_cyclone.py) +- [`the_cyclone.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/15_the_cyclone_1.py) (solution 1) +- [`the_cyclone.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/15_the_cyclone_2.py) (solution 2) - [`sorting_hat.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/16_sorting_hat_1.py) (solution 1) - [`sorting_hat.py`](https://github.com/codedex-io/python-101/blob/main/3-control-flow/16_sorting_hat_2.py) (solution 2) From 3bce0cc963c919ca93c241d25802dc994f363b54 Mon Sep 17 00:00:00 2001 From: Jakub Sova Date: Thu, 10 Oct 2024 18:08:45 +0200 Subject: [PATCH 28/73] fix: link (Ch. 5 Exercise 25) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fad5185..1ba0037 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H - [`grocery.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/22_grocery.py) - [`todo.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/23_todo.py) - [`inventory.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/24_inventory.py) -- [`reading.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/25_reading.py) +- [`reading.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/25_reading_list.py) - [`mixtape.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/26_mixtape.py) - [`bucket_list.py`](https://github.com/codedex-io/python-101/blob/main/5-lists/27_bucket_list.py) From 94eb3dd3f820ec2f2022ccbb56426980350ce33c Mon Sep 17 00:00:00 2001 From: Jakub Sova Date: Thu, 10 Oct 2024 18:13:57 +0200 Subject: [PATCH 29/73] fix: link (Ch. 7 Exercise 38) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fad5185..49ab6d8 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ Welcome to The Legend of Python GitHub repo! We are super excited to have you. H - [`bobs_burgers.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/35_bobs_burgers.py) - [`favorite_cities.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/36_favorite_cities.py) - [`bank_accounts.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/37_bank_accounts.py) -- [`pokedex.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/38_pokedex.py) +- [`pokedex.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/38_pokedex_1.py) (solution 1) +- [`pokedex.py`](https://github.com/codedex-io/python-101/blob/main/7-classes-objects/38_pokedex_2.py) (solution 2) ## Modules From f1b0e18027299d7b2c20b0172308fe038263d4be Mon Sep 17 00:00:00 2001 From: Milan Date: Fri, 11 Oct 2024 13:27:58 +0200 Subject: [PATCH 30/73] Fixed typo in lesson 09. --- 2-variables/09_hypotenuse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-variables/09_hypotenuse.py b/2-variables/09_hypotenuse.py index 9b1894f..eb6b9e7 100644 --- a/2-variables/09_hypotenuse.py +++ b/2-variables/09_hypotenuse.py @@ -1,4 +1,4 @@ -# Pythagorean Theroem 📐 +# Pythagorean Theorem 📐 # Codédex a = int(input("Enter a: ")) From ed5f96abbcfa3ad0e53c520ce0231123fe02995f Mon Sep 17 00:00:00 2001 From: Milan Date: Fri, 11 Oct 2024 13:43:42 +0200 Subject: [PATCH 31/73] Fixed typo in solution file 27_bucket_list.py. --- 5-lists/27_bucket_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-lists/27_bucket_list.py b/5-lists/27_bucket_list.py index 0c4e2f8..f4dcfa7 100644 --- a/5-lists/27_bucket_list.py +++ b/5-lists/27_bucket_list.py @@ -2,7 +2,7 @@ # Codédex things_to_do = [ - '🚀 Build a menaingful product for everyone.', + '🚀 Build a meaningful product for everyone.', '⛰ Try out hiking and mountain biking.', '🌏 Visit at least 10 countries in my lifetime.', '🎸 Produce an original song.', From 30687b1078a8cc712a7b22124739b784dba25405 Mon Sep 17 00:00:00 2001 From: Milan Date: Fri, 11 Oct 2024 13:51:12 +0200 Subject: [PATCH 32/73] Fixed typo in projects.md. --- projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects.md b/projects.md index 20fd964..6e66f9f 100644 --- a/projects.md +++ b/projects.md @@ -4,7 +4,7 @@ - 🥠 Fortune Cookie - 🎲 Dice Rolling Simulator -- 🫱 Rock Paper Scisssors +- 🫱 Rock Paper Scissors - 🫱 Rock Paper Scissors Lizard Spark - 🤑 Who Wants to Be a Millionaire - ❓ Quiz Game From 9455e940956343ae1a78a0fa811ae9ea29e6b14c Mon Sep 17 00:00:00 2001 From: Thor Christensen Date: Wed, 16 Oct 2024 08:26:51 +0200 Subject: [PATCH 33/73] =?UTF-8?q?Fix=20Charizard's=20Pok=C3=A9dex=20number?= =?UTF-8?q?=20from=203=20to=206=20in=20both=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 7-classes-objects/38_pokedex_1.py | 2 +- 7-classes-objects/38_pokedex_2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/7-classes-objects/38_pokedex_1.py b/7-classes-objects/38_pokedex_1.py index 6b533ee..f11d4a1 100644 --- a/7-classes-objects/38_pokedex_1.py +++ b/7-classes-objects/38_pokedex_1.py @@ -31,7 +31,7 @@ def display_details(self): # Pokémon objects pikachu = Pokemon(25, 'Pikachu', ['Electric'], 'It has small electric sacs on both its cheeks. If threatened, it looses electric charges from the sacs.', True) -charizard = Pokemon(3, 'Charizard', ['Fire', 'Flying'], 'It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.', False) +charizard = Pokemon(6, 'Charizard', ['Fire', 'Flying'], 'It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.', False) gyarados = Pokemon(130, 'Gyarados', ['Water', 'Flying'], 'It has an extremely aggressive nature. The HYPER BEAM it shoots from its mouth totally incinerates all targets.', False) pikachu.speak() diff --git a/7-classes-objects/38_pokedex_2.py b/7-classes-objects/38_pokedex_2.py index b483644..91c3311 100644 --- a/7-classes-objects/38_pokedex_2.py +++ b/7-classes-objects/38_pokedex_2.py @@ -35,7 +35,7 @@ def display_details(self): # Pokémon objects pikachu = Pokemon(25, 'Pikachu', ['Electric'], 'It has small electric sacs on both its cheeks. If threatened, it looses electric charges from the sacs.', 25, 'Kanto', True) -charizard = Pokemon(3, 'Charizard', ['Fire', 'Flying'], 'It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.', 36, 'Kanto', False) +charizard = Pokemon(6, 'Charizard', ['Fire', 'Flying'], 'It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.', 36, 'Kanto', False) gyarados = Pokemon(130, 'Gyarados', ['Water', 'Flying'], 'It has an extremely aggressive nature. The HYPER BEAM it shoots from its mouth totally incinerates all targets.', 57, 'Kanto', False) pikachu.speak() From 91af2af610e24630d1e0d958a1ddc28b226f1f20 Mon Sep 17 00:00:00 2001 From: Bruno Viola <99220989+BrunoViola@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:54:33 -0300 Subject: [PATCH 34/73] Fix: List in the solution differs from the instructions. I noticed that the instructions in section 24, 'Inventory,' mention a list named 'lego_parts,' but here on GitHub, the list used is 'airplane_toys. --- 5-lists/24_inventory.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/5-lists/24_inventory.py b/5-lists/24_inventory.py index 99f001c..1c1cb5a 100644 --- a/5-lists/24_inventory.py +++ b/5-lists/24_inventory.py @@ -1,7 +1,7 @@ # Inventory 📦 # Codédex -airplane_toys = [ 898, 732, 543, 878 ] +lego_parts = [8980, 7323, 5343, 82700, 92232, 1203, 7319, 8903, 2328, 1279, 679, 589] -print(min(airplane_toys)) -print(max(airplane_toys)) +print(min(lego_parts)) +print(max(lego_parts)) From 4e99491c6d36971c0de4899cf44f82feca0a8423 Mon Sep 17 00:00:00 2001 From: Milan Date: Tue, 22 Oct 2024 21:41:13 +0200 Subject: [PATCH 35/73] Added missing standard header. --- 1-hello-world/02_hello_world.py | 3 +++ 1-hello-world/03_pattern.py | 3 +++ 1-hello-world/04_initials.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/1-hello-world/02_hello_world.py b/1-hello-world/02_hello_world.py index 60f08aa..d66b420 100644 --- a/1-hello-world/02_hello_world.py +++ b/1-hello-world/02_hello_world.py @@ -1 +1,4 @@ +# Hello World 🌎 +# Codédex + print('Hello world!') diff --git a/1-hello-world/03_pattern.py b/1-hello-world/03_pattern.py index 1ed538d..86d5f65 100644 --- a/1-hello-world/03_pattern.py +++ b/1-hello-world/03_pattern.py @@ -1,3 +1,6 @@ +# Pattern 📊 +# Codédex + print(' 1') print(' 2 3') print(' 4 5 6') diff --git a/1-hello-world/04_initials.py b/1-hello-world/04_initials.py index 57a2076..c35b1e3 100644 --- a/1-hello-world/04_initials.py +++ b/1-hello-world/04_initials.py @@ -1,3 +1,6 @@ +# Initials ℹ️ +# Codédex + # Fun fact: My high school band Attica was signed to an indie record label. print(' SSS L ') From 9df24ed98456fc67e09872b868005e209d33597e Mon Sep 17 00:00:00 2001 From: Bruno Viola <99220989+BrunoViola@users.noreply.github.com> Date: Wed, 23 Oct 2024 02:04:35 +0000 Subject: [PATCH 36/73] fix: add missing print(vars()) --- 7-classes-objects/35_bobs_burgers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/7-classes-objects/35_bobs_burgers.py b/7-classes-objects/35_bobs_burgers.py index c174dcb..68264cc 100644 --- a/7-classes-objects/35_bobs_burgers.py +++ b/7-classes-objects/35_bobs_burgers.py @@ -24,3 +24,7 @@ class Restaurant: baekjeong.type = 'Korean BBQ' baekjeong.rating = 4.4 baekjeong.delivery = False + +print(vars(bobs_burgers)) +print(vars(katz_deli)) +print(vars(baekjeong)) \ No newline at end of file From d91ac53c3bd3ad08200653b2e8c902c087218adc Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Fri, 25 Oct 2024 17:39:56 -0400 Subject: [PATCH 37/73] Update 25_reading_list.py --- 5-lists/25_reading_list.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/5-lists/25_reading_list.py b/5-lists/25_reading_list.py index 9a9d646..07ace1e 100644 --- a/5-lists/25_reading_list.py +++ b/5-lists/25_reading_list.py @@ -1,16 +1,16 @@ # Reading List 📚 # Codédex -books = ['Zero to One', - 'The Lean Startup', +books = ['Harry Potter', + '1984', + 'The Fault in Our Stars', 'The Mom Test', - 'Made to Stick', 'Life in Code'] print(books) -books.append('Zero to Sold') -books.remove('Zero to One') -books.pop(0) +books.append('Pachinko') +books.remove('The Fault in Our Stars') +books.pop(1) print(books) From 434a509938f85806259095e8b2a6fecc7d9d251f Mon Sep 17 00:00:00 2001 From: Bruno Viola <99220989+BrunoViola@users.noreply.github.com> Date: Sat, 26 Oct 2024 22:33:28 -0300 Subject: [PATCH 38/73] fix: correct attributes name to match instructions I noticed that the names of the attributes in the sollution were different from the instructions given in class 34, Restaurants. Then, I corrected this to ensure consistency. --- 7-classes-objects/34_restaurants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/7-classes-objects/34_restaurants.py b/7-classes-objects/34_restaurants.py index b8e1299..3986bfe 100644 --- a/7-classes-objects/34_restaurants.py +++ b/7-classes-objects/34_restaurants.py @@ -3,6 +3,6 @@ class Restaurant: name = '' - description = '' + category = '' rating = 0.0 - deliver = True + delivery = True From 422e615d80f2be29c9d6c661cefc2a0eb16e1d82 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 13 Nov 2024 23:56:58 -0500 Subject: [PATCH 39/73] Update 16_sorting_hat_1.py --- 3-control-flow/16_sorting_hat_1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/3-control-flow/16_sorting_hat_1.py b/3-control-flow/16_sorting_hat_1.py index c1547dc..f9747fc 100644 --- a/3-control-flow/16_sorting_hat_1.py +++ b/3-control-flow/16_sorting_hat_1.py @@ -77,13 +77,13 @@ print("Hufflepuff: ", hufflepuff) print("Slytherin: ", slytherin) -most_points = max(gryffindor, ravenclaw, hufflepuff, slytherin) # We'll learn about max() in the Functions chapter +# Bonus Part -if gryffindor == most_points: +if gryffindor >= ravenclaw and gryffindor >= hufflepuff and gryffindor >= slytherin: print('🦁 Gryffindor!') -elif ravenclaw == most_points: +elif ravenclaw >= hufflepuff and ravenclaw >= slytherin: print('🦅 Ravenclaw!') -elif hufflepuff == most_points: +elif hufflepuff >= slytherin: print('🦡 Hufflepuff!') else: print('🐍 Slytherin!') From d0e9e51325c3892808efb9fbdd345bf29c30ce1c Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 13 Nov 2024 23:57:42 -0500 Subject: [PATCH 40/73] Update 16_sorting_hat_2.py --- 3-control-flow/16_sorting_hat_2.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/3-control-flow/16_sorting_hat_2.py b/3-control-flow/16_sorting_hat_2.py index 55692c1..be56f5c 100644 --- a/3-control-flow/16_sorting_hat_2.py +++ b/3-control-flow/16_sorting_hat_2.py @@ -77,11 +77,15 @@ print("Hufflepuff: ", hufflepuff) print("Slytherin: ", slytherin) -if gryffindor >= ravenclaw and gryffindor >= hufflepuff and gryffindor >= slytherin: +# Bonus Part + +most_points = max(gryffindor, ravenclaw, hufflepuff, slytherin) # We'll learn about the max() function in Chapter 6 + +if gryffindor == most_points: print('🦁 Gryffindor!') -elif ravenclaw >= hufflepuff and ravenclaw >= slytherin: +elif ravenclaw == most_points: print('🦅 Ravenclaw!') -elif hufflepuff >= slytherin: +elif hufflepuff == most_points: print('🦡 Hufflepuff!') else: - print('🐍 Slytherin!') \ No newline at end of file + print('🐍 Slytherin!') From e6ff9020c826a69e6c6863bcbdd3816cb7bd4b3e Mon Sep 17 00:00:00 2001 From: Julien Kris <65314071+jules-kris@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:22:38 -0500 Subject: [PATCH 41/73] Update 02_hello_world.py --- 1-hello-world/02_hello_world.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/02_hello_world.py b/1-hello-world/02_hello_world.py index d66b420..0ebb3e7 100644 --- a/1-hello-world/02_hello_world.py +++ b/1-hello-world/02_hello_world.py @@ -1,4 +1,4 @@ # Hello World 🌎 # Codédex -print('Hello world!') +print('Hello World!') From 6a3ac446daee948947abdf9f4f9f0e02bdc37746 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Mon, 3 Mar 2025 01:50:51 -0500 Subject: [PATCH 42/73] Update 02_hello_world.py --- 1-hello-world/02_hello_world.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/1-hello-world/02_hello_world.py b/1-hello-world/02_hello_world.py index 0ebb3e7..73fb7c3 100644 --- a/1-hello-world/02_hello_world.py +++ b/1-hello-world/02_hello_world.py @@ -1,4 +1 @@ -# Hello World 🌎 -# Codédex - print('Hello World!') From d345860b0e1beba64cc18fff369bf834c678422c Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Mon, 3 Mar 2025 01:51:01 -0500 Subject: [PATCH 43/73] Update 03_pattern.py --- 1-hello-world/03_pattern.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/1-hello-world/03_pattern.py b/1-hello-world/03_pattern.py index 86d5f65..1ed538d 100644 --- a/1-hello-world/03_pattern.py +++ b/1-hello-world/03_pattern.py @@ -1,6 +1,3 @@ -# Pattern 📊 -# Codédex - print(' 1') print(' 2 3') print(' 4 5 6') From 64efdc5800805bee8ce49b172fde32eb68dd3838 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Mon, 3 Mar 2025 01:51:15 -0500 Subject: [PATCH 44/73] Update 04_initials.py --- 1-hello-world/04_initials.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/1-hello-world/04_initials.py b/1-hello-world/04_initials.py index c35b1e3..57a2076 100644 --- a/1-hello-world/04_initials.py +++ b/1-hello-world/04_initials.py @@ -1,6 +1,3 @@ -# Initials ℹ️ -# Codédex - # Fun fact: My high school band Attica was signed to an indie record label. print(' SSS L ') From 8f9562cb9b26cac7783a8ac53f7e3b23871d41f1 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Sun, 13 Apr 2025 16:40:23 -0400 Subject: [PATCH 45/73] Update 18_guess_number.py --- 4-loops/18_guess_number.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4-loops/18_guess_number.py b/4-loops/18_guess_number.py index cfbb6c0..1597cad 100644 --- a/4-loops/18_guess_number.py +++ b/4-loops/18_guess_number.py @@ -5,7 +5,7 @@ tries = 0 while guess != 6 and tries < 5: - guess = int(input('Guess the number: ')) + guess = int(input('Guess the number: ')) tries = tries + 1 if guess != 6: From 1cbab24fca2015820051f42834cd76008f3f6cf2 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Sun, 20 Apr 2025 17:38:00 -0400 Subject: [PATCH 46/73] Update 16_sorting_hat_1.py --- 3-control-flow/16_sorting_hat_1.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/3-control-flow/16_sorting_hat_1.py b/3-control-flow/16_sorting_hat_1.py index f9747fc..9355579 100644 --- a/3-control-flow/16_sorting_hat_1.py +++ b/3-control-flow/16_sorting_hat_1.py @@ -20,11 +20,11 @@ answer = int(input('Enter answer (1-2): ')) if answer == 1: - gryffindor += 1 - ravenclaw += 1 + gryffindor = gryffindor + 1 + ravenclaw = ravenclaw + 1 elif answer == 2: - hufflepuff += 1 - slytherin +=1 + hufflepuff = hufflepuff + 1 + slytherin = slytherin + 1 else: print('Wrong input.') @@ -40,13 +40,13 @@ answer = int(input('Enter your answer (1-4): ')) if answer == 1: - hufflepuff += 2 + hufflepuff = hufflepuff + 2 elif answer == 2: - slytherin += 2 + slytherin = slytherin + 2 elif answer == 3: - ravenclaw += 2 + ravenclaw = ravenclaw + 2 elif answer == 4: - gryffindor += 2 + gryffindor = gryffindor + 2 else: print('Wrong input.') @@ -62,13 +62,13 @@ answer = int(input('Enter your answer (1-4): ')) if answer == 1: - slytherin += 4 + slytherin = slytherin + 4 elif answer == 2: - hufflepuff += 4 + hufflepuff = hufflepuff + 4 elif answer == 3: - ravenclaw +=4 + ravenclaw = ravenclaw + 4 elif answer == 4: - gryffindor += 4 + gryffindor = gryffindor + 4 else: print('Wrong input.') From c0ef0d4921767b0311be25cb8cc4c85eb2c2e054 Mon Sep 17 00:00:00 2001 From: Ellie Popoca Date: Fri, 6 Jun 2025 01:17:25 -0400 Subject: [PATCH 47/73] Update 30_rocket.py --- 6-functions/30_rocket.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/6-functions/30_rocket.py b/6-functions/30_rocket.py index 306c2eb..d928b41 100644 --- a/6-functions/30_rocket.py +++ b/6-functions/30_rocket.py @@ -2,7 +2,7 @@ # Codédex def distance_to_miles(distance): - return distance / 1.609 + miles = distance / 1.609 + print(miles) -answer = distance_to_miles(10000) -print(answer) +distance_to_miles(10000) From 2499d8fb1c7ce5d753af684128a5be42d5a9470d Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Mon, 9 Jun 2025 17:05:04 -0400 Subject: [PATCH 48/73] Create 02_setting_up.py --- 1-hello-world/02_setting_up.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 1-hello-world/02_setting_up.py diff --git a/1-hello-world/02_setting_up.py b/1-hello-world/02_setting_up.py new file mode 100644 index 0000000..4ac8144 --- /dev/null +++ b/1-hello-world/02_setting_up.py @@ -0,0 +1,3 @@ +# Write code below 💖 + +print('Hi') From 5595ce77f1d7fa7740c2be7d1e86fcef2b1ef6c4 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Mon, 9 Jun 2025 17:05:16 -0400 Subject: [PATCH 49/73] Rename 02_setting_up.py to 01_setting_up.py --- 1-hello-world/{02_setting_up.py => 01_setting_up.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 1-hello-world/{02_setting_up.py => 01_setting_up.py} (100%) diff --git a/1-hello-world/02_setting_up.py b/1-hello-world/01_setting_up.py similarity index 100% rename from 1-hello-world/02_setting_up.py rename to 1-hello-world/01_setting_up.py From 4b16d09955f61fc7cdcadddd076352c03a346ccd Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 11:58:50 -0400 Subject: [PATCH 50/73] Update 04_initials.py --- 1-hello-world/04_initials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/04_initials.py b/1-hello-world/04_initials.py index 57a2076..9e60c6d 100644 --- a/1-hello-world/04_initials.py +++ b/1-hello-world/04_initials.py @@ -1,4 +1,4 @@ -# Fun fact: My high school band Attica was signed to an indie record label. +# Fun fact: My high school band Attica was signed to an indie record label. 🤘 print(' SSS L ') print('S S L ') From c1eed55e1c21949315985f226a1370172bdd2eb0 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:04:12 -0400 Subject: [PATCH 51/73] Update 05_letter.py --- 1-hello-world/05_letter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/1-hello-world/05_letter.py b/1-hello-world/05_letter.py index fed0003..939c03d 100644 --- a/1-hello-world/05_letter.py +++ b/1-hello-world/05_letter.py @@ -6,8 +6,9 @@ print('| Brooklyn, NY |') print('| Dear Self, |') print('| |') -print('| Build the learn to code platform that you always dreamed of. |') -print('| Give more than you take. |') +print('| Build the platform you always dreamed of — |') +print('| the one you wish existed when you started out. |') +print('| Give more than you take. Always. |') print('| Care > capital. |') print('| Five-second funerals for all the Ls. |') print('| And always get back up. |') From 7f4513d90e7dbce7e9f20e50588589cb8f5adee4 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:04:33 -0400 Subject: [PATCH 52/73] Update 05_letter.py --- 1-hello-world/05_letter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/05_letter.py b/1-hello-world/05_letter.py index 939c03d..c3b74a8 100644 --- a/1-hello-world/05_letter.py +++ b/1-hello-world/05_letter.py @@ -8,7 +8,7 @@ print('| |') print('| Build the platform you always dreamed of — |') print('| the one you wish existed when you started out. |') -print('| Give more than you take. Always. |') +print('| Give more than you take. |') print('| Care > capital. |') print('| Five-second funerals for all the Ls. |') print('| And always get back up. |') From 872fadd31bad8381353705e1b118f0fd0c0d87b2 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:05:08 -0400 Subject: [PATCH 53/73] Update 05_letter.py --- 1-hello-world/05_letter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/05_letter.py b/1-hello-world/05_letter.py index c3b74a8..048af1b 100644 --- a/1-hello-world/05_letter.py +++ b/1-hello-world/05_letter.py @@ -9,7 +9,7 @@ print('| Build the platform you always dreamed of — |') print('| the one you wish existed when you started out. |') print('| Give more than you take. |') -print('| Care > capital. |') +print('| Care > capital. Don't get lose the why. |') print('| Five-second funerals for all the Ls. |') print('| And always get back up. |') print('| |') From 5ae15d3f3aeabbd915af39c8345ab5d0b487ef13 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:05:49 -0400 Subject: [PATCH 54/73] Update 05_letter.py --- 1-hello-world/05_letter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-hello-world/05_letter.py b/1-hello-world/05_letter.py index 048af1b..e203f8a 100644 --- a/1-hello-world/05_letter.py +++ b/1-hello-world/05_letter.py @@ -7,12 +7,12 @@ print('| Dear Self, |') print('| |') print('| Build the platform you always dreamed of — |') -print('| the one you wish existed when you started out. |') +print('| the one you wish existed when you started. |') print('| Give more than you take. |') print('| Care > capital. Don't get lose the why. |') print('| Five-second funerals for all the Ls. |') print('| And always get back up. |') print('| |') -print('| Sonny Li 🤠 |') +print('| Sonny Li 🤠 |') print('| |') print('+---------------------------------------------------------------------+') From e8f9243f2e3c8c6e14ea31b08b9e8045e206bbb9 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:06:37 -0400 Subject: [PATCH 55/73] Update 05_letter.py --- 1-hello-world/05_letter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/05_letter.py b/1-hello-world/05_letter.py index e203f8a..6b91111 100644 --- a/1-hello-world/05_letter.py +++ b/1-hello-world/05_letter.py @@ -9,7 +9,7 @@ print('| Build the platform you always dreamed of — |') print('| the one you wish existed when you started. |') print('| Give more than you take. |') -print('| Care > capital. Don't get lose the why. |') +print('| Care > capital. |') print('| Five-second funerals for all the Ls. |') print('| And always get back up. |') print('| |') From 96c33fd29b24372c2e1b946fec63ab1fb457ed5d Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:09:38 -0400 Subject: [PATCH 56/73] Update 05_letter.py --- 1-hello-world/05_letter.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/1-hello-world/05_letter.py b/1-hello-world/05_letter.py index 6b91111..16b6c46 100644 --- a/1-hello-world/05_letter.py +++ b/1-hello-world/05_letter.py @@ -4,14 +4,14 @@ print('+---------------------------------------------------------------------+') print('| June 2022 |') print('| Brooklyn, NY |') -print('| Dear Self, |') +print('| Dear Self, |') print('| |') -print('| Build the platform you always dreamed of — |') -print('| the one you wish existed when you started. |') -print('| Give more than you take. |') -print('| Care > capital. |') -print('| Five-second funerals for all the Ls. |') -print('| And always get back up. |') +print('| Build the platform you always dreamed of — |') +print('| the one you wish existed when you started. |') +print('| Give more than you take. |') +print('| Care > capital. |') +print('| Five-second funerals for all the Ls. |') +print('| And always get back up. |') print('| |') print('| Sonny Li 🤠 |') print('| |') From ec0baa8e5d8450a18ff6229478b494121b633cfd Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:11:10 -0400 Subject: [PATCH 57/73] Update 05_letter.py --- 1-hello-world/05_letter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/05_letter.py b/1-hello-world/05_letter.py index 16b6c46..6ab6728 100644 --- a/1-hello-world/05_letter.py +++ b/1-hello-world/05_letter.py @@ -13,6 +13,6 @@ print('| Five-second funerals for all the Ls. |') print('| And always get back up. |') print('| |') -print('| Sonny Li 🤠 |') +print('| Sonny 🤠 |') print('| |') print('+---------------------------------------------------------------------+') From f5a1e504ac213514e5c0ad839b86e9937ff8212d Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:16:02 -0400 Subject: [PATCH 58/73] Create 05_letter_2.py --- 1-hello-world/05_letter_2.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 1-hello-world/05_letter_2.py diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py new file mode 100644 index 0000000..05af0a2 --- /dev/null +++ b/1-hello-world/05_letter_2.py @@ -0,0 +1,17 @@ +# Snail Mail 💌 +# Codédex + +print('+---------------------------------------------------------------------+') +print('| |') +print('| |') +print('| Wrote myself a letter |') +print('| Just a single question |') +print('| When you finally get this |') +print('| Where will you be? |') +print('| Will you be a shipwreck or a star |') +print('| Falling for a boy who doesn't play guitar? |') +print('| Now rewind the tape back to the start |') +print('| Said I'd never leave you, but here we are |') +print('| |') +print('| |') +print('+---------------------------------------------------------------------+') From dbb89c2054420119892865c79b280347f8029861 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:16:30 -0400 Subject: [PATCH 59/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 05af0a2..9486537 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -9,9 +9,9 @@ print('| When you finally get this |') print('| Where will you be? |') print('| Will you be a shipwreck or a star |') -print('| Falling for a boy who doesn't play guitar? |') +print('| Falling for a boy who doesn\'t play guitar? |') print('| Now rewind the tape back to the start |') -print('| Said I'd never leave you, but here we are |') +print('| Said I\'d never leave you, but here we are |') print('| |') print('| |') print('+---------------------------------------------------------------------+') From ef5666e2140983ee658265659c1c4b903184d707 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:17:15 -0400 Subject: [PATCH 60/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 9486537..e325238 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -13,5 +13,6 @@ print('| Now rewind the tape back to the start |') print('| Said I\'d never leave you, but here we are |') print('| |') +print('| - Caroline Polachek |') print('| |') print('+---------------------------------------------------------------------+') From d61962fffa960eb0efd0e27e97ad03376eaa2f31 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:17:47 -0400 Subject: [PATCH 61/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index e325238..8c036de 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -6,8 +6,10 @@ print('| |') print('| Wrote myself a letter |') print('| Just a single question |') +print('| |') print('| When you finally get this |') print('| Where will you be? |') +print('| |') print('| Will you be a shipwreck or a star |') print('| Falling for a boy who doesn\'t play guitar? |') print('| Now rewind the tape back to the start |') From 3a9fffb3251dee579cecbaa43b452f9c47d2f002 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:18:53 -0400 Subject: [PATCH 62/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 8c036de..24b5937 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -5,10 +5,9 @@ print('| |') print('| |') print('| Wrote myself a letter |') -print('| Just a single question |') +print('| just a single question |') print('| |') -print('| When you finally get this |') -print('| Where will you be? |') +print('| "When you finally get this, where will you be?" |') print('| |') print('| Will you be a shipwreck or a star |') print('| Falling for a boy who doesn\'t play guitar? |') From cb8e318b6e86b8017ae4f6cfae1aa00470897229 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:19:26 -0400 Subject: [PATCH 63/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 24b5937..f1b84df 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -7,12 +7,10 @@ print('| Wrote myself a letter |') print('| just a single question |') print('| |') -print('| "When you finally get this, where will you be?" |') -print('| |') +print('| "When you finally get this, where will you be? |') print('| Will you be a shipwreck or a star |') -print('| Falling for a boy who doesn\'t play guitar? |') -print('| Now rewind the tape back to the start |') -print('| Said I\'d never leave you, but here we are |') +print('| Falling for a boy who doesn\'t play guitar?" |') +print('| |') print('| |') print('| - Caroline Polachek |') print('| |') From 6c4d52022c4d6f5f79d7e728623db7e77114f249 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:21:13 -0400 Subject: [PATCH 64/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index f1b84df..8024029 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -7,10 +7,11 @@ print('| Wrote myself a letter |') print('| just a single question |') print('| |') -print('| "When you finally get this, where will you be? |') +print('| "When you finally get this, where will you be? |') print('| Will you be a shipwreck or a star |') print('| Falling for a boy who doesn\'t play guitar?" |') print('| |') +print('| Now rewind the tape back to the start |') print('| |') print('| - Caroline Polachek |') print('| |') From 00090fedd7c1af4d0a8af888552654bef86dcd9c Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:22:50 -0400 Subject: [PATCH 65/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 8024029..244e276 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -15,4 +15,5 @@ print('| |') print('| - Caroline Polachek |') print('| |') +print('| |') print('+---------------------------------------------------------------------+') From 6b6abe98593c3bf86776e8eff60c6339ebb9a0f1 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:23:29 -0400 Subject: [PATCH 66/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 1 - 1 file changed, 1 deletion(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 244e276..4bfc4d3 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -10,7 +10,6 @@ print('| "When you finally get this, where will you be? |') print('| Will you be a shipwreck or a star |') print('| Falling for a boy who doesn\'t play guitar?" |') -print('| |') print('| Now rewind the tape back to the start |') print('| |') print('| - Caroline Polachek |') From 4d3714044960813d8e4ecf2e501257489563c671 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:25:01 -0400 Subject: [PATCH 67/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 4bfc4d3..51f8414 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -8,10 +8,13 @@ print('| just a single question |') print('| |') print('| "When you finally get this, where will you be? |') +print('| |') print('| Will you be a shipwreck or a star |') print('| Falling for a boy who doesn\'t play guitar?" |') print('| Now rewind the tape back to the start |') print('| |') +print('| https://youtube.com/watch?v=jZtUJ4b2jsw |') +print('| |') print('| - Caroline Polachek |') print('| |') print('| |') From 959735ab9c2e2d40e3454df8bf98c96151ff3d4d Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:25:11 -0400 Subject: [PATCH 68/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 51f8414..f4f04e5 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -15,7 +15,7 @@ print('| |') print('| https://youtube.com/watch?v=jZtUJ4b2jsw |') print('| |') -print('| - Caroline Polachek |') +print('| - Caroline Polachek |') print('| |') print('| |') print('+---------------------------------------------------------------------+') From 4c9dd58ff8179ccd124f6ae0cc3a59d3825f1e2a Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:25:50 -0400 Subject: [PATCH 69/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index f4f04e5..4d48735 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -13,7 +13,7 @@ print('| Falling for a boy who doesn\'t play guitar?" |') print('| Now rewind the tape back to the start |') print('| |') -print('| https://youtube.com/watch?v=jZtUJ4b2jsw |') +print('| https://youtube.com/watch?v=jZtUJ4b2jsw 👀 |') print('| |') print('| - Caroline Polachek |') print('| |') From aea2705e444d7dd6d0d7a2ca106ab96317a65868 Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:26:02 -0400 Subject: [PATCH 70/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 4d48735..00342f2 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -13,9 +13,9 @@ print('| Falling for a boy who doesn\'t play guitar?" |') print('| Now rewind the tape back to the start |') print('| |') -print('| https://youtube.com/watch?v=jZtUJ4b2jsw 👀 |') +print('| https://youtube.com/watch?v=jZtUJ4b2jsw 👀 |') print('| |') -print('| - Caroline Polachek |') +print('| - Caroline Polachek |') print('| |') print('| |') print('+---------------------------------------------------------------------+') From 6572b2015e2ff51f8fe4f160be11f79b800dd09d Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:26:11 -0400 Subject: [PATCH 71/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 00342f2..5c10862 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -13,7 +13,7 @@ print('| Falling for a boy who doesn\'t play guitar?" |') print('| Now rewind the tape back to the start |') print('| |') -print('| https://youtube.com/watch?v=jZtUJ4b2jsw 👀 |') +print('| https://youtube.com/watch?v=jZtUJ4b2jsw |') print('| |') print('| - Caroline Polachek |') print('| |') From 9b88beac4b7cd0b40a824b67b31f9a2255f530db Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:26:24 -0400 Subject: [PATCH 72/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index 5c10862..ba94f81 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -13,8 +13,6 @@ print('| Falling for a boy who doesn\'t play guitar?" |') print('| Now rewind the tape back to the start |') print('| |') -print('| https://youtube.com/watch?v=jZtUJ4b2jsw |') -print('| |') print('| - Caroline Polachek |') print('| |') print('| |') From cd104584cd9b67bd094c1502d9ba8e75e46e7afe Mon Sep 17 00:00:00 2001 From: Sonny Li Date: Wed, 9 Jul 2025 12:43:18 -0400 Subject: [PATCH 73/73] Update 05_letter_2.py --- 1-hello-world/05_letter_2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-hello-world/05_letter_2.py b/1-hello-world/05_letter_2.py index ba94f81..d3076b1 100644 --- a/1-hello-world/05_letter_2.py +++ b/1-hello-world/05_letter_2.py @@ -7,10 +7,10 @@ print('| Wrote myself a letter |') print('| just a single question |') print('| |') -print('| "When you finally get this, where will you be? |') +print('| "When you finally get this, where will you be?" ✨ |') print('| |') print('| Will you be a shipwreck or a star |') -print('| Falling for a boy who doesn\'t play guitar?" |') +print('| Falling for a boy who doesn\'t play guitar? |') print('| Now rewind the tape back to the start |') print('| |') print('| - Caroline Polachek |')