Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions 1-hello-world/01_setting_up.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Write code below 💖

print('Hi')
1 change: 0 additions & 1 deletion 1-hello-world/02_hello_world.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
print('Hello World!')
4 changes: 0 additions & 4 deletions 1-hello-world/03_pattern.py
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
print(' 1')
print(' 2 3')
print(' 4 5 6')
print('7 8 9 10')
8 changes: 0 additions & 8 deletions 1-hello-world/04_initials.py
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
# Fun fact: My high school band Attica was signed to an indie record label. 🤘

print(' SSS L ')
print('S S L ')
print('S L ')
print(' SSS L ')
print(' S L ')
print('S S L ')
print(' SSS LLLLL')
24 changes: 0 additions & 24 deletions 1-hello-world/05_letter.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,2 @@
# Snail Mail 💌
# Codédex

print('+---------------------------------------------------------------------------------+')
print('| |')
print('| October 2025 |')
print('| Brooklyn, NY |')
print('| Dear Self, |')
print('| |')
print('| Does great art require suffering? |')
print('| Does great product demand capital? |')
print('| Did you find any truth at the end of the road? |')
print('| |')
print('| Regardless, go build the learning platform you’ve always dreamed of — |')
print('| the one you wish existed when you first started. |')
print('| |')
print('| Give more than you take. |')
print('| Take only what you need. |')
print('| |')
print('| And when things fall apart, get tf back up. |')
print('| |')
print('| - Sonny Li |')
print('| |')
print('| P.S. Hope I made you proud. You got this, kiddo. 🤠 |')
print('| |')
print('+---------------------------------------------------------------------------------+')
17 changes: 0 additions & 17 deletions 1-hello-world/05_letter_2.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
# Snail Mail 💌
# Codédex

print('+---------------------------------------------------------------------+')
print('| |')
print('| |')
print('| Wrote myself a letter |')
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('| - Caroline Polachek |')
print('| |')
print('| |')
print('+---------------------------------------------------------------------+')
4 changes: 0 additions & 4 deletions 2-variables/07_temperature.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Temperature 🌡
# Codédex

temp_f = 56
temp_c = (temp_f - 32) / 1.8

print(temp_c)
7 changes: 0 additions & 7 deletions 2-variables/08_bmi.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
# BMI 🏋️‍♀️
# Codédex

weight = 92.3
height = 1.86

bmi = weight / (height**2)

print(bmi)
7 changes: 0 additions & 7 deletions 2-variables/09_hypotenuse.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
# Pythagorean Theorem 📐
# Codédex

a = int(input("Enter a: "))
b = int(input("Enter b: "))

c = (a**2 + b**2) ** 0.5

print(c)
9 changes: 0 additions & 9 deletions 2-variables/09_quadratic.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Quadratic Formula 🧮
# Codédex

a = int(input("Enter a: "))
b = int(input("Enter b: "))
c = int(input("Enter c: "))

root1 = (-b + (b*b - 4*a*c)**0.5) / (2*a)
root2 = (-b - (b*b - 4*a*c)**0.5) / (2*a)

print(root1)
print(root2)
8 changes: 0 additions & 8 deletions 2-variables/10_currency.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
# Currency 💵
# Codédex

pesos = int(input('What do you have left in pesos? '))
soles = int(input('What do you have left in soles? '))
reais = int(input('What do you have left in reais? '))

total = pesos * 0.00025 + soles * 0.28 + reais * 0.21

print(total)
10 changes: 0 additions & 10 deletions 3-control-flow/11_coin_flip.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
# Coin Flip 🪙
# Codédex

import random

num = random.randint(0, 1)

if num > 0.5:
print('Heads')
else:
print('Tails')

7 changes: 0 additions & 7 deletions 3-control-flow/12_grades.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
# Grades 💯
# Codédex

grade = 58

if grade >= 55:
print('You passed.')
else:
print('You failed.')
8 changes: 0 additions & 8 deletions 3-control-flow/13_ph_levels.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# pH Levels 🧪
# Codédex

ph = int(input('Enter a pH level (0-14): '))

if ph > 7:
print('Basic')
elif ph < 7:
print('Acidic')
else:
print('Neutral')
28 changes: 0 additions & 28 deletions 3-control-flow/14_magic_8_ball.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
# Magic 8 Ball 🎱
# Codédex

import random

question = input('Question: ')

random_number = random.randint(1, 9)

if random_number == 1:
answer = 'Yes - definitely'
elif random_number == 2:
answer = 'It is decidedly so'
elif random_number == 3:
answer = 'Without a doubt'
elif random_number == 4:
answer = 'Reply hazy, try again'
elif random_number == 5:
answer = 'Ask again later'
elif random_number == 6:
answer = 'Better not tell you now'
elif random_number == 7:
answer = 'My sources say no'
elif random_number == 8:
answer = 'Outlook not so good'
elif random_number == 9:
answer = 'Very doubtful'
else:
answer = 'Error'

print('Magic 8 Ball: ' + answer)
11 changes: 0 additions & 11 deletions 3-control-flow/15_the_cyclone_1.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# The Cyclone 🎢
# Codédex

height = int(input('What is your height (cm)? '))
credits = int(input('How many credits do you have? '))

if height >= 137 and credits >= 10:
print("Enjoy the ride!")
elif height < 137 and credits >= 10:
print("You are not tall enough to ride.")
elif credits < 10 and height >= 137:
print("You don't have enough credits to ride.")
else:
print("You are not tall enough for this ride, nor do you have enough credits.")
14 changes: 0 additions & 14 deletions 3-control-flow/15_the_cyclone_2.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# The Cyclone 🎢
# Codédex

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
enough_credits = credits >= 10

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("Sorry! The ride is currently closed!")
86 changes: 0 additions & 86 deletions 3-control-flow/16_sorting_hat_1.py
Original file line number Diff line number Diff line change
@@ -1,89 +1,3 @@
# Sorting Hat 🧙‍♂️
# Codédex

gryffindor = 0
hufflepuff = 0
ravenclaw = 0
slytherin = 0

print('===============')
print('The Sorting Hat')
print('===============')

# ~~~~~~~~~~~~~~~ Question 1 ~~~~~~~~~~~~~~~

print('Q1) Do you like Dawn or Dusk?')

print(' 1) Dawn')
print(' 2) Dusk')

answer = int(input('Enter answer (1-2): '))

if answer == 1:
gryffindor = gryffindor + 1
ravenclaw = ravenclaw + 1
elif answer == 2:
hufflepuff = hufflepuff + 1
slytherin = slytherin + 1
else:
print('Wrong input.')

# ~~~~~~~~~~~~~~~ Question 2 ~~~~~~~~~~~~~~~

print("\nQ2) When I'm dead, I want people to remember me as:")

print(' 1) The Good')
print(' 2) The Great')
print(' 3) The Wise')
print(' 4) The Bold')

answer = int(input('Enter your answer (1-4): '))

if answer == 1:
hufflepuff = hufflepuff + 2
elif answer == 2:
slytherin = slytherin + 2
elif answer == 3:
ravenclaw = ravenclaw + 2
elif answer == 4:
gryffindor = gryffindor + 2
else:
print('Wrong input.')

# ~~~~~~~~~~~~~~~ Question 3 ~~~~~~~~~~~~~~~

print('\nQ3) Which kind of instrument most pleases your ear?')

print(' 1) The violin')
print(' 2) The trumpet')
print(' 3) The piano')
print(' 4) The drum')

answer = int(input('Enter your answer (1-4): '))

if answer == 1:
slytherin = slytherin + 4
elif answer == 2:
hufflepuff = hufflepuff + 4
elif answer == 3:
ravenclaw = ravenclaw + 4
elif answer == 4:
gryffindor = gryffindor + 4
else:
print('Wrong input.')

print("Gryffindor: ", gryffindor)
print("Ravenclaw: ", ravenclaw)
print("Hufflepuff: ", hufflepuff)
print("Slytherin: ", slytherin)

# Bonus Part

if gryffindor >= ravenclaw and gryffindor >= hufflepuff and gryffindor >= slytherin:
print('🦁 Gryffindor!')
elif ravenclaw >= hufflepuff and ravenclaw >= slytherin:
print('🦅 Ravenclaw!')
elif hufflepuff >= slytherin:
print('🦡 Hufflepuff!')
else:
print('🐍 Slytherin!')
Loading