diff --git a/Java/1-Control-Flow/1-Girl-Scout-Cookies.java b/Java/1-Control-Flow/1-Girl-Scout-Cookies.java new file mode 100644 index 0000000..076df85 --- /dev/null +++ b/Java/1-Control-Flow/1-Girl-Scout-Cookies.java @@ -0,0 +1,11 @@ +public class CodeChallenge { + public static void main(String[] args) { + int boxes = 75; + + if (boxes > 50) { + System.out.println("Girl power!"); + } else { + System.out.println("Missed goal"); + } + } +} \ No newline at end of file diff --git a/Java/1-Control-Flow/2-Starbuck-Cups.java b/Java/1-Control-Flow/2-Starbuck-Cups.java new file mode 100644 index 0000000..7f03814 --- /dev/null +++ b/Java/1-Control-Flow/2-Starbuck-Cups.java @@ -0,0 +1,17 @@ +public class CodeChallenge { + public static void main(String[] args) { + int size = 16; + + if (size == 8) { + System.out.println("Short"); + } else if (size == 12) { + System.out.println("Tall"); + } else if (size == 16) { + System.out.println("Grande"); + } else if (size == 20) { + System.out.println("Venti"); + } else { + System.out.println("Not a valid size"); + } + } +} \ No newline at end of file diff --git a/Java/1-Control-Flow/3-Tip-Calculator.java b/Java/1-Control-Flow/3-Tip-Calculator.java new file mode 100644 index 0000000..dfb33e3 --- /dev/null +++ b/Java/1-Control-Flow/3-Tip-Calculator.java @@ -0,0 +1,20 @@ + +public class CodeChallenge { + public static void main(String[] args) { + double subtotal = 96.82; + int option = 20; + double tip = 0.0; + + if (option == 15) { + tip = subtotal * 0.15; + } else if (option == 20) { + tip = subtotal * 0.20; + } else if (option == 25) { + tip = subtotal * 0.25; + } else { + System.out.println("Invalid tip percentage"); + } + + System.out.println("Tip: $" + tip); + } +} diff --git a/Java/1-Control-Flow/4-Work-Hours.java b/Java/1-Control-Flow/4-Work-Hours.java new file mode 100644 index 0000000..e9c0886 --- /dev/null +++ b/Java/1-Control-Flow/4-Work-Hours.java @@ -0,0 +1,12 @@ +public class CodeChallenge { + public static void main(String[] args) { + int hour = 14; + boolean isWeekend = false; + + if (hour >= 10 && hour <= 18 && !isWeekend) { + System.out.println("The office is open ๐ŸŸข"); + } else { + System.out.println("The office is closed ๐Ÿ”ด"); + } + } +} \ No newline at end of file diff --git a/Java/1-Control-Flow/5-Movie-Tickets.java b/Java/1-Control-Flow/5-Movie-Tickets.java new file mode 100644 index 0000000..b3c601e --- /dev/null +++ b/Java/1-Control-Flow/5-Movie-Tickets.java @@ -0,0 +1,29 @@ +import java.util.Scanner; + +public class CodeChallenge { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.println("Enter your age:"); + int age = scanner.nextInt(); + + System.out.println("Enter the day of the week (1-7):"); + int day = scanner.nextInt(); + + if (age <= 12) { + System.out.println("Ticket $7"); + } else if (age <= 17) { + System.out.println("Ticket $10"); + } else if (age <= 64 && day >= 1 && day <= 5) { + System.out.println("Ticket $13"); + } else if (age <= 64 && day >= 6 && day <= 7) { + System.out.println("Ticket $15"); + } else if (age >= 65 && day >= 1 && day <= 5) { + System.out.println("Ticket $8"); + } else if (age >= 65 && day >= 6 && day <= 7) { + System.out.println("Ticket $10"); + } else { + System.out.println("Invalid input"); + } + } +} \ No newline at end of file diff --git a/Java/2-Loops/1-One-Mississippi.java b/Java/2-Loops/1-One-Mississippi.java new file mode 100644 index 0000000..273ed63 --- /dev/null +++ b/Java/2-Loops/1-One-Mississippi.java @@ -0,0 +1,7 @@ +public class CodeChallenge { + public static void main(String[] args) { + for (int i = 1; i <= 20; i++) { + System.out.println(i + " Mississippi"); + } + } +} \ No newline at end of file diff --git a/Java/2-Loops/2-Ticketmaster-Queue.java b/Java/2-Loops/2-Ticketmaster-Queue.java new file mode 100644 index 0000000..8ec553a --- /dev/null +++ b/Java/2-Loops/2-Ticketmaster-Queue.java @@ -0,0 +1,8 @@ +public class CodeChallenge { + public static void main(String[] args) { + for (int i = 2000; i > 0; i -= 200) { + System.out.println("There are " + i + " people ahead of you."); + } + System.out.println("There are 0 people ahead of you. Your turn!"); + } +} \ No newline at end of file diff --git a/Java/2-Loops/3-Safe-Word.java b/Java/2-Loops/3-Safe-Word.java new file mode 100644 index 0000000..0508ed3 --- /dev/null +++ b/Java/2-Loops/3-Safe-Word.java @@ -0,0 +1,18 @@ +import java.util.Scanner; + +public class CodeChallenge { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + String safeWord = "pineapple"; + + System.out.print("What's the safe word? "); + String response = scanner.nextLine(); + + while (!response.equals(safeWord)) { + System.out.print("What's the safe word? "); + response = scanner.nextLine(); + } + + System.out.println("You got it!"); + } +} \ No newline at end of file diff --git a/Java/2-Loops/4-Piggy-Bank.java b/Java/2-Loops/4-Piggy-Bank.java new file mode 100644 index 0000000..cf6140e --- /dev/null +++ b/Java/2-Loops/4-Piggy-Bank.java @@ -0,0 +1,18 @@ +public class CodeChallenge { + public static void main(String[] args) { + double weeklyDeposit = 3.50; + double balance = 0.0; + + for (int i = 1; i <= 52; i++) { + balance += weeklyDeposit; + } + + System.out.println("Total: $" + balance); + + if (balance > 100) { + System.out.println("You saved enough money"); + } else { + System.out.println("Keep saving"); + } + } +} \ No newline at end of file diff --git a/Java/2-Loops/5-Maraton-Runner.java b/Java/2-Loops/5-Maraton-Runner.java new file mode 100644 index 0000000..df4e2da --- /dev/null +++ b/Java/2-Loops/5-Maraton-Runner.java @@ -0,0 +1,18 @@ +import java.util.Scanner; + +public class CodeChallenge { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int goal = 1000; + int total = 0; + + while (total < goal) { + System.out.print("How much to donate? "); + int donation = scanner.nextInt(); + total += donation; + System.out.println("Total: $" + total); + } + + System.out.println("Goal reached!"); + } +} \ No newline at end of file diff --git a/Javascript/1-Conditionals/1-Nite-Owl.js b/Javascript/1-Conditionals/1-Nite-Owl.js new file mode 100644 index 0000000..07f080f --- /dev/null +++ b/Javascript/1-Conditionals/1-Nite-Owl.js @@ -0,0 +1,7 @@ +let hour = 6; + +if (hour < 8) { + console.log("Early bird gets the worm"); +} else { + console.log("But who wants a worm?"); +} diff --git a/Javascript/1-Conditionals/2-Michelin-Stars.js b/Javascript/1-Conditionals/2-Michelin-Stars.js new file mode 100644 index 0000000..319a842 --- /dev/null +++ b/Javascript/1-Conditionals/2-Michelin-Stars.js @@ -0,0 +1,11 @@ +let rating = 2; + +if (rating === 1) { + console.log("๐ŸŒŸ is worth walking to."); +} else if (rating === 2) { + console.log("๐ŸŒŸ๐ŸŒŸ is worth driving to."); +} else if (rating === 3) { + console.log("๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ is worth flying to."); +} else { + console.log("Invalid."); +} diff --git a/Javascript/1-Conditionals/3-TGIF.js b/Javascript/1-Conditionals/3-TGIF.js new file mode 100644 index 0000000..c2162d8 --- /dev/null +++ b/Javascript/1-Conditionals/3-TGIF.js @@ -0,0 +1,11 @@ +let day = 5; + +if (day >= 1 && day <= 4) { + console.log("Not Friday, yet!"); +} else if (day === 5) { + console.log("TGIF ๐Ÿ•บ"); +} else if (day === 6 || day === 7) { + console.log("Yay, weekends! ๐Ÿ™Œ"); +} else { + console.log("Wait, what day is it?"); +} diff --git a/Javascript/1-Conditionals/4-Decades.js b/Javascript/1-Conditionals/4-Decades.js new file mode 100644 index 0000000..1f12c7a --- /dev/null +++ b/Javascript/1-Conditionals/4-Decades.js @@ -0,0 +1,15 @@ +let year = 1963; + +if (year >= 1920 && year <= 1929) { + console.log("Roaring Twenties"); +} else if (year >= 1930 && year <= 1939) { + console.log("Dirty Thirties"); +} else if (year >= 1940 && year <= 1949) { + console.log("Fighting Forties"); +} else if (year >= 1950 && year <= 1959) { + console.log("Fabulous Fifties"); +} else if (year >= 1960 && year <= 1969) { + console.log("Swinging Sixties"); +} else { + console.log("Year out of range"); +} diff --git a/Javascript/1-Conditionals/5-Fitness-Routine.js b/Javascript/1-Conditionals/5-Fitness-Routine.js new file mode 100644 index 0000000..f26118f --- /dev/null +++ b/Javascript/1-Conditionals/5-Fitness-Routine.js @@ -0,0 +1,11 @@ +let randomNumber = Math.floor(Math.random() * 4); + +if (randomNumber === 0) { + console.log("10 Push-ups"); +} else if (randomNumber === 1) { + console.log("10 Sit-ups"); +} else if (randomNumber === 2) { + console.log("10 Squats"); +} else { + console.log("10 Jumping Jacks"); +} diff --git a/Javascript/2-Loops/1-Blast-Off.js b/Javascript/2-Loops/1-Blast-Off.js new file mode 100644 index 0000000..90d6317 --- /dev/null +++ b/Javascript/2-Loops/1-Blast-Off.js @@ -0,0 +1,4 @@ +for (let i = 10; i > 0; i--) { + console.log(i); +} +console.log("To infinity and beyond! ๐Ÿš€"); \ No newline at end of file diff --git a/Javascript/2-Loops/2-Swag-Raffle.js b/Javascript/2-Loops/2-Swag-Raffle.js new file mode 100644 index 0000000..0bd9a71 --- /dev/null +++ b/Javascript/2-Loops/2-Swag-Raffle.js @@ -0,0 +1,16 @@ + +let count = 0; +let targetNumber = Math.floor(Math.random() * 100); + +while (count < 10) { + let drawNumber = Math.floor(Math.random() * 100); + + if (drawNumber === targetNumber) { + count++; + console.log("Match"); + } else { + console.log("No Match"); + } +} + +console.log(`The number ${targetNumber} was found 10 times.`); \ No newline at end of file diff --git a/Javascript/2-Loops/3-Odd-Cubes.js b/Javascript/2-Loops/3-Odd-Cubes.js new file mode 100644 index 0000000..ca2957f --- /dev/null +++ b/Javascript/2-Loops/3-Odd-Cubes.js @@ -0,0 +1,8 @@ +let limit = 7; +let total = 0; + +for (let i = 1; i <= limit; i += 2) { + total += i * i * i; +} + +console.log(total); \ No newline at end of file diff --git a/Javascript/2-Loops/4-Dice-Doubles.js b/Javascript/2-Loops/4-Dice-Doubles.js new file mode 100644 index 0000000..e766c7b --- /dev/null +++ b/Javascript/2-Loops/4-Dice-Doubles.js @@ -0,0 +1,15 @@ +let die1 = Math.floor(Math.random() * 6) + 1; +let die2 = Math.floor(Math.random() * 6) + 1; +let numberOfRolls = 0; + +while (die1 !== die2) { + console.log(`Roll 1: ${die1}`); + console.log(`Roll 2: ${die2}`); + numberOfRolls++; + die1 = Math.floor(Math.random() * 6) + 1; + die2 = Math.floor(Math.random() * 6) + 1; +} + +console.log(`Roll 1: ${die1}`); +console.log(`Roll 2: ${die2}`); +console.log(`Number of rolls: ${numberOfRolls}`); \ No newline at end of file diff --git a/Javascript/2-Loops/5-Fibonacci-Sequence.js b/Javascript/2-Loops/5-Fibonacci-Sequence.js new file mode 100644 index 0000000..613101f --- /dev/null +++ b/Javascript/2-Loops/5-Fibonacci-Sequence.js @@ -0,0 +1,12 @@ +let firstFib = 0; +let secondFib = 1; + +console.log(firstFib); +console.log(secondFib); + +for (let i = 2; i < 10; i++) { + let nextFib = firstFib + secondFib; + console.log(nextFib); + firstFib = secondFib; + secondFib = nextFib; +} \ No newline at end of file diff --git a/html/1-Elements/1-Garage-Sale.html b/html/1-Elements/1-Garage-Sale.html new file mode 100644 index 0000000..6c9ce4c --- /dev/null +++ b/html/1-Elements/1-Garage-Sale.html @@ -0,0 +1,10 @@ + + + + Garage Sale Listing + + +

Vintage Bicycle - $45

+

Classic 1980s road bike in good working condition. Recently tuned up, ready to ride. Minor cosmetic wear but mechanically sound.

+ + \ No newline at end of file diff --git a/html/1-Elements/2-Movie-Review.html b/html/1-Elements/2-Movie-Review.html new file mode 100644 index 0000000..b90578d --- /dev/null +++ b/html/1-Elements/2-Movie-Review.html @@ -0,0 +1,11 @@ + + + + Movie Review + + +

Dune: Part Two (2024)

+

โญโญโญโญโญ

+

An epic sci-fi masterpiece with stunning visuals and gripping action sequences. The intricate plot and stellar cast make this a must-watch film that exceeds the original in every way. ๐ŸŽฌ

+ + \ No newline at end of file diff --git a/html/1-Elements/3-Packing-List.html b/html/1-Elements/3-Packing-List.html new file mode 100644 index 0000000..34e4888 --- /dev/null +++ b/html/1-Elements/3-Packing-List.html @@ -0,0 +1,17 @@ + + + + Beach Packing List + + + + + \ No newline at end of file diff --git a/html/1-Elements/4-Map-Direcitons.html b/html/1-Elements/4-Map-Direcitons.html new file mode 100644 index 0000000..fa919eb --- /dev/null +++ b/html/1-Elements/4-Map-Direcitons.html @@ -0,0 +1,15 @@ + + + + Directions to Coffee Shop + + +
    +
  1. Exit home and turn left on Main Street
  2. +
  3. Walk two blocks north
  4. +
  5. Turn right on Oak Avenue
  6. +
  7. Continue for one block
  8. +
  9. The coffee shop is on your left next to the bakery
  10. +
+ + \ No newline at end of file diff --git a/html/1-Elements/5-Ramen-Restaurant.html b/html/1-Elements/5-Ramen-Restaurant.html new file mode 100644 index 0000000..f5d7ff2 --- /dev/null +++ b/html/1-Elements/5-Ramen-Restaurant.html @@ -0,0 +1,11 @@ + + + + Ramen Menu + + +

Spicy Miso Ramen

+ Spicy Miso Ramen +

Rich miso broth with tender chashu pork, soft-boiled egg, bamboo shoots, and a spicy kick. Topped with green onions and sesame seeds.

+ + \ No newline at end of file diff --git a/html/1-Elements/6-For-Rent.html b/html/1-Elements/6-For-Rent.html new file mode 100644 index 0000000..ce2efbb --- /dev/null +++ b/html/1-Elements/6-For-Rent.html @@ -0,0 +1,21 @@ + + + + Apartment Listing + + +

Modern Downtown Loft

+

Financial District - $2,500/month

+ Modern Downtown Loft +

Beautiful 1-bedroom loft in the heart of the city with floor-to-ceiling windows and natural light throughout. Recently renovated with contemporary finishes and high-end appliances.

+

Walking distance to restaurants, shops, and public transportation. Perfect for professionals seeking urban living with convenience and style.

+ + Schedule a Tour + + \ No newline at end of file diff --git a/html/2-Structure/1-Song-Lyrics.html b/html/2-Structure/1-Song-Lyrics.html new file mode 100644 index 0000000..7b4a3d4 --- /dev/null +++ b/html/2-Structure/1-Song-Lyrics.html @@ -0,0 +1,14 @@ + + + + Song Lyrics + + +

Imagine by John Lennon

+

Imagine all the people living life in peace, you

+

You may say I'm a dreamer, but I'm not the only one

+

I hope someday you'll join us and the world will be as one

+

Imagine no possessions, I wonder if you can

+ + + \ No newline at end of file diff --git a/html/2-Structure/2-Metamorphosis.html b/html/2-Structure/2-Metamorphosis.html new file mode 100644 index 0000000..406ced3 --- /dev/null +++ b/html/2-Structure/2-Metamorphosis.html @@ -0,0 +1,15 @@ + + + + Butterfly Lifecycle + + +

The Butterfly Lifecycle

+
    +
  1. Egg - A tiny egg is laid on a leaf by the female butterfly
  2. +
  3. Caterpillar - The egg hatches into a caterpillar that eats leaves and grows
  4. +
  5. Chrysalis - The caterpillar forms a protective chrysalis to undergo metamorphosis
  6. +
  7. Butterfly - An adult butterfly emerges from the chrysalis with wings
  8. +
+ + \ No newline at end of file diff --git a/html/2-Structure/3-Best-Fan-Page.html b/html/2-Structure/3-Best-Fan-Page.html new file mode 100644 index 0000000..121fe64 --- /dev/null +++ b/html/2-Structure/3-Best-Fan-Page.html @@ -0,0 +1,18 @@ + + + + Fan Page + + +

Alex

+ Alex smiling at the beach +

Check out Alex's favorite podcast: The Joe Rogan Experience

+
    +
  1. Always makes me laugh with terrible jokes
  2. +
  3. Incredibly loyal and dependable friend
  4. +
  5. Great at giving honest advice
  6. +
  7. Never backs down from a challenge
  8. +
  9. Has the best taste in music
  10. +
+ + \ No newline at end of file diff --git a/html/2-Structure/4-Messy-Closet.html b/html/2-Structure/4-Messy-Closet.html new file mode 100644 index 0000000..61eb7d0 --- /dev/null +++ b/html/2-Structure/4-Messy-Closet.html @@ -0,0 +1,21 @@ + + + + My Closet + + +

My Closet

+ Winter Clothes + Summer Clothes + +
+

Winter Clothes

+

Heavy coats, sweaters, thermal layers, scarves, beanies, and gloves to keep warm during cold months.

+
+ +
+

Summer Clothes

+

Light t-shirts, shorts, sandals, tank tops, and sunhats perfect for warm weather and outdoor activities.

+
+ + \ No newline at end of file diff --git a/html/2-Structure/5-I-Spy.html b/html/2-Structure/5-I-Spy.html new file mode 100644 index 0000000..8d84833 --- /dev/null +++ b/html/2-Structure/5-I-Spy.html @@ -0,0 +1,36 @@ + + + + I Spy + + + +

I spy with my little eye something...

+
Lamp
+
Desk
+
Book
+
Chair
+
Window
+ + \ No newline at end of file diff --git a/html/structure/juliens-art-mart.html b/html/2-Structure/6-Julien's-Art-Mart.html similarity index 68% rename from html/structure/juliens-art-mart.html rename to html/2-Structure/6-Julien's-Art-Mart.html index 6c2acb6..3b7d031 100644 --- a/html/structure/juliens-art-mart.html +++ b/html/2-Structure/6-Julien's-Art-Mart.html @@ -1,5 +1,3 @@ - - @@ -17,21 +15,18 @@ -

Julien's Art Mart

+

Julien's Art Mart

- - Shop Supplies + Shop Supplies

Acrylic Paint Set

- Acrylic paint set + Acrylic Paint Set

Paint Brushes

- - - + \ No newline at end of file diff --git a/html/elements/for-rent.html b/html/elements/for-rent.html deleted file mode 100644 index b06db6c..0000000 --- a/html/elements/for-rent.html +++ /dev/null @@ -1,15 +0,0 @@ - - -

Bright 1 Bedroom Apartment

-

Williamsburg - $2,400/month

-An apartment -

Spacious apartment with lots of natural light.

-

Close to the L train, vintage shops, and restaurants.

- - -Zillow listing - diff --git a/html/elements/garage-sale.html b/html/elements/garage-sale.html deleted file mode 100644 index 9be8f85..0000000 --- a/html/elements/garage-sale.html +++ /dev/null @@ -1,4 +0,0 @@ - - -

Lugia Pokรฉmon card ($20 OBO)

-

Holographic. 1999 edition. Mint.

diff --git a/html/elements/map-directions.html b/html/elements/map-directions.html deleted file mode 100644 index ba996d2..0000000 --- a/html/elements/map-directions.html +++ /dev/null @@ -1,9 +0,0 @@ - - -
    -
  1. Leave the house and turn right.
  2. -
  3. Walk two blocks.
  4. -
  5. Turn left at Main Street.
  6. -
  7. Walk one block.
  8. -
  9. The coffee shop is on the corner!
  10. -
\ No newline at end of file diff --git a/html/elements/movie-review.html b/html/elements/movie-review.html deleted file mode 100644 index 2f8d4ad..0000000 --- a/html/elements/movie-review.html +++ /dev/null @@ -1,5 +0,0 @@ - - -

Mamma Mia 2 (2018)

-

โญ๏ธโญ๏ธโญ๏ธโญ๏ธ

-

love can be so awesome... and scary

\ No newline at end of file diff --git a/html/elements/packing-list.html b/html/elements/packing-list.html deleted file mode 100644 index dc128eb..0000000 --- a/html/elements/packing-list.html +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/html/elements/ramen-restaurant.html b/html/elements/ramen-restaurant.html deleted file mode 100644 index 403faba..0000000 --- a/html/elements/ramen-restaurant.html +++ /dev/null @@ -1,5 +0,0 @@ - - -

Tonkotsu Ramen

- -

Pork broth with classic thin noodles, topped with chashu, scallion, and chili oil.

diff --git a/html/structure/bestie-fan-page.html b/html/structure/bestie-fan-page.html deleted file mode 100644 index 68c8f63..0000000 --- a/html/structure/bestie-fan-page.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - Bestie Fan Page - - -

Joan

- Photo of my best friend -
Her favorite website is Youtube -
    -
  1. Always down to yap
  2. -
  3. Silliest person I know
  4. -
  5. Has a huge heart
  6. -
- - \ No newline at end of file diff --git a/html/structure/i-spy.html b/html/structure/i-spy.html deleted file mode 100644 index ad55d87..0000000 --- a/html/structure/i-spy.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - I Spy - - - -

I spy with my little eyeโ€ฆ

- -
- - - diff --git a/html/structure/messy-closet.html b/html/structure/messy-closet.html deleted file mode 100644 index 49fb51c..0000000 --- a/html/structure/messy-closet.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - My Closet - - -

My Closet

- - Winter - Summer - -
-

Winter

-

Coats, fleece-lined pants, and boots.

-
- -
-

Summer

-

Tank tops, shorts, and sandals.

-
- - diff --git a/html/structure/metamorphosis.html b/html/structure/metamorphosis.html deleted file mode 100644 index 54dda7a..0000000 --- a/html/structure/metamorphosis.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - Butterfly Lifecycle - - -

Butterfly Lifecycle

-
    -
  1. ๐Ÿฅš Egg
  2. -
  3. ๐Ÿ› Caterpillar
  4. -
  5. ๐ŸŒ€ Chrysalis
  6. -
  7. ๐Ÿฆ‹ Butterfly
  8. -
- - diff --git a/html/structure/song-lyrics.html b/html/structure/song-lyrics.html deleted file mode 100644 index 37f5ad0..0000000 --- a/html/structure/song-lyrics.html +++ /dev/null @@ -1,12 +0,0 @@ - - -

Cloudbusting - Kate Bush

-โ€‹โ€‹ -

You're like my yo-yo

-

That glowed in the dark

-

What made it special

-

Made it dangerous

-

So I bury it

-

And forget

\ No newline at end of file diff --git a/python/1-Variables/1-Year-of-the-Snake.py b/python/1-Variables/1-Year-of-the-Snake.py new file mode 100644 index 0000000..f9ca781 --- /dev/null +++ b/python/1-Variables/1-Year-of-the-Snake.py @@ -0,0 +1,9 @@ +year = 2026 +focus = 0.85 +skin = "self-doubt" +shedding = True + +print(year) +print(focus) +print(skin) +print(shedding) \ No newline at end of file diff --git a/python/1-Variables/2-Credit-Card.py b/python/1-Variables/2-Credit-Card.py new file mode 100644 index 0000000..6f35a7e --- /dev/null +++ b/python/1-Variables/2-Credit-Card.py @@ -0,0 +1,6 @@ +balance = 250.00 +rate = 0.02 + +balance = balance + (balance * rate) + +print(balance) \ No newline at end of file diff --git a/python/1-Variables/3-Moore's-Law.py b/python/1-Variables/3-Moore's-Law.py new file mode 100644 index 0000000..ea3c6fb --- /dev/null +++ b/python/1-Variables/3-Moore's-Law.py @@ -0,0 +1,7 @@ +#there's a bug so it says it's wrong but it's propably right, i can't validate this right now +transistors = 25000000000 +years = 10 + +transistors = int(transistors * (2 ** (years / 2))) + +print(transistors) \ No newline at end of file diff --git a/python/1-Variables/4-Even-Odd.py b/python/1-Variables/4-Even-Odd.py new file mode 100644 index 0000000..7242653 --- /dev/null +++ b/python/1-Variables/4-Even-Odd.py @@ -0,0 +1,3 @@ +num = 7 + +print(num % 2) \ No newline at end of file diff --git a/python/1-Variables/5-Pet-Age.py b/python/1-Variables/5-Pet-Age.py new file mode 100644 index 0000000..afe4265 --- /dev/null +++ b/python/1-Variables/5-Pet-Age.py @@ -0,0 +1,9 @@ +pet = "dog" +age = int(input("Enter your dog's age: ")) + +if pet == "dog": + human_age = age * 7 +else: + human_age = age * 6 + +print(human_age) \ No newline at end of file diff --git a/python/2-Control-Flow/1-food-ratings.py b/python/2-Control-Flow/1-food-ratings.py new file mode 100644 index 0000000..e2eb262 --- /dev/null +++ b/python/2-Control-Flow/1-food-ratings.py @@ -0,0 +1,14 @@ +# Codรฉdex : Ratings + +rating = 4.5 + +if rating == 5.0: + print('Perfection') +elif rating >= 4: + print('Excellent') +elif rating >= 3: + print('Good') +elif rating >= 2: + print('Fair') +else: + print('Poor') diff --git a/python/control-flow/2-high-school-grades.py b/python/2-Control-Flow/2-High-school-grades.py similarity index 63% rename from python/control-flow/2-high-school-grades.py rename to python/2-Control-Flow/2-High-school-grades.py index fb87c51..d376fad 100644 --- a/python/control-flow/2-high-school-grades.py +++ b/python/2-Control-Flow/2-High-school-grades.py @@ -1,6 +1,6 @@ -# ๐ŸŽ’ High School Grades +# Codรฉdex : Grades -grade = int(input('Enter your grade level: ')) +grade = int(input('Enter your grade: ')) if grade == 9: print('Freshman') @@ -11,4 +11,4 @@ elif grade == 12: print('Senior') else: - print('TBD') \ No newline at end of file + print('TBD') diff --git a/python/2-Control-Flow/3-Snapple-Facts.py b/python/2-Control-Flow/3-Snapple-Facts.py new file mode 100644 index 0000000..7c630a7 --- /dev/null +++ b/python/2-Control-Flow/3-Snapple-Facts.py @@ -0,0 +1,16 @@ +import random + +num = random.randint(1, 6) + +if num == 1: + print('Flamingos turn pink by eating shrimp.') +elif num == 2: + print('Honey never goes bad.') +elif num == 3: + print('Shrimp can only swim backwards.') +elif num == 4: + print('A taste bud\'s life is about 10 days.') +elif num == 5: + print('You can\'t sneeze while sleeping.') +else: + print('Tiny pocket in jeans was for watches.') diff --git a/python/2-Control-Flow/4-Seasons-of-the-Year.py b/python/2-Control-Flow/4-Seasons-of-the-Year.py new file mode 100644 index 0000000..359ebd1 --- /dev/null +++ b/python/2-Control-Flow/4-Seasons-of-the-Year.py @@ -0,0 +1,14 @@ +# # Codรฉdex : Months + +month = int(input("Enter a month number: ")) + +if month == 1 or month == 2 or month == 3: + print('Winter ๐ŸŒจ๏ธ') +elif month == 4 or month == 5 or month == 6: + print('Spring ๐ŸŒฑ') +elif month == 7 or month == 8 or month == 9: + print('Summer ๐ŸŒป') +elif month == 10 or month == 11 or month == 12: + print('Autumn ๐Ÿ‚') +else: + print('Invalid') diff --git a/python/2-Control-Flow/5-Planet-Weights.py b/python/2-Control-Flow/5-Planet-Weights.py new file mode 100644 index 0000000..f9f0d65 --- /dev/null +++ b/python/2-Control-Flow/5-Planet-Weights.py @@ -0,0 +1,24 @@ +# Codรฉdex : Planet Weights + +weight = float(input("Enter your Earth weight: ")) +planet = int(input("Enter a planet number (1-7): ")) + +if planet == 1: + gravity = 0.38 +elif planet == 2: + gravity = 0.91 +elif planet == 3: + gravity = 0.38 +elif planet == 4: + gravity = 2.53 +elif planet == 5: + gravity = 1.07 +elif planet == 6: + gravity = 0.89 +elif planet == 7: + gravity = 1.14 +else: + print('Invalid number') + +if planet >= 1 and planet <= 7: + print("Your weight on that planet:", weight * gravity) diff --git a/python/3-Loops/2-New-Year-Countdown.py b/python/3-Loops/2-New-Year-Countdown.py new file mode 100644 index 0000000..0ba882f --- /dev/null +++ b/python/3-Loops/2-New-Year-Countdown.py @@ -0,0 +1,6 @@ +# # Codรฉdex :: New Year Countdown + +for i in range(10,0,-1): + print(i) + +print('Happy New Year! ๐ŸŒท') diff --git a/python/3-Loops/3-Snake-Eyes.py b/python/3-Loops/3-Snake-Eyes.py new file mode 100644 index 0000000..58190f2 --- /dev/null +++ b/python/3-Loops/3-Snake-Eyes.py @@ -0,0 +1,14 @@ +# # Codรฉdex :: Dice Roll +import random + +die1 = random.randint(1, 6) +die2 = random.randint(1, 6) +total = die1 + die2 + +while total != 2: + print('Nope') + die1 = random.randint(1, 6) + die2 = random.randint(1, 6) + total = die1 + die2 + +print('Snake eyes!') diff --git a/python/3-Loops/4-Asterisks.py b/python/3-Loops/4-Asterisks.py new file mode 100644 index 0000000..c12199e --- /dev/null +++ b/python/3-Loops/4-Asterisks.py @@ -0,0 +1,4 @@ +# Codรฉdex :: Asterisks + +for i in range(1, 25): + print('* ' * i) diff --git a/python/3-Loops/5-Sum-of-Squares.py b/python/3-Loops/5-Sum-of-Squares.py new file mode 100644 index 0000000..77cf8d9 --- /dev/null +++ b/python/3-Loops/5-Sum-of-Squares.py @@ -0,0 +1,9 @@ +# Codรฉdex :: Squares + +number = int(input("Enter an integer: ")) +total = 0 + +for i in range(1, number + 1): + total += i ** 2 + +print(total) diff --git a/python/4-Functions/1-James-Bond.py b/python/4-Functions/1-James-Bond.py new file mode 100644 index 0000000..b24406f --- /dev/null +++ b/python/4-Functions/1-James-Bond.py @@ -0,0 +1,6 @@ +# Write code below ๐Ÿ’– + +def greetings(first_name, last_name): + print(f"{last_name}, {first_name} {last_name}") + +greetings('Richard', 'Hendricks') diff --git a/python/4-Functions/2-Average-Number.py b/python/4-Functions/2-Average-Number.py new file mode 100644 index 0000000..688ce5d --- /dev/null +++ b/python/4-Functions/2-Average-Number.py @@ -0,0 +1,2 @@ +def average(num1, num2): + return (num1 + num2) / 2 diff --git a/python/4-Functions/3-KDA-Ratio.py b/python/4-Functions/3-KDA-Ratio.py new file mode 100644 index 0000000..1a3fc82 --- /dev/null +++ b/python/4-Functions/3-KDA-Ratio.py @@ -0,0 +1,4 @@ +def kda(k, d, a): + return (k + a) / d + +print(kda(10, 2, 5)) diff --git a/python/4-Functions/4-Moon-Phases.py b/python/4-Functions/4-Moon-Phases.py new file mode 100644 index 0000000..8ba8d6a --- /dev/null +++ b/python/4-Functions/4-Moon-Phases.py @@ -0,0 +1,22 @@ +def moon_phase(phase): + if phase == 'New Moon': + return '๐ŸŒ‘' + elif phase == 'Waxing Crescent': + return '๐ŸŒ’' + elif phase == 'First Quarter': + return '๐ŸŒ“' + elif phase == 'Waxing Gibbous': + return '๐ŸŒ”' + elif phase == 'Full Moon': + return '๐ŸŒ•' + elif phase == 'Waning Gibbous': + return '๐ŸŒ–' + elif phase == 'Last Quarter': + return '๐ŸŒ—' + elif phase == 'Waning Crescent': + return '๐ŸŒ˜' + else: + return 'Invalid moon phase' + +answer = moon_phase('New Moon') +print(answer) diff --git a/python/4-Functions/5-Dog-Years.py b/python/4-Functions/5-Dog-Years.py new file mode 100644 index 0000000..a8813c1 --- /dev/null +++ b/python/4-Functions/5-Dog-Years.py @@ -0,0 +1,6 @@ +def dog_years(name, age): + return f"{name} is {age * 7} years old in human years." + +print(dog_years('Landon', 3)) +print(dog_years('Red Bean', 6)) +print(dog_years('Cooper', 2)) diff --git a/python/5-Lists/1-Wishlist.py b/python/5-Lists/1-Wishlist.py new file mode 100644 index 0000000..2d700d2 --- /dev/null +++ b/python/5-Lists/1-Wishlist.py @@ -0,0 +1,3 @@ +wishlist = ['RTX 5090', 'Rasberry Pi', 'Github Pro'] + +print(wishlist) diff --git a/python/5-Lists/2-Lottery.py b/python/5-Lists/2-Lottery.py new file mode 100644 index 0000000..3f64a9b --- /dev/null +++ b/python/5-Lists/2-Lottery.py @@ -0,0 +1,14 @@ +import random + +my_numbers = [] +winning_numbers = [] + +for i in range(0, 5): + my_numbers.append(random.randint(1, 69)) + winning_numbers.append(random.randint(1, 69)) + +my_numbers.append(random.randint(1, 26)) +winning_numbers.append(random.randint(1, 26)) + +print("My Numbers:", my_numbers) +print("Winning Numbers:", winning_numbers) diff --git a/python/5-Lists/3-The-Oscars.py b/python/5-Lists/3-The-Oscars.py new file mode 100644 index 0000000..bfb59eb --- /dev/null +++ b/python/5-Lists/3-The-Oscars.py @@ -0,0 +1,19 @@ +best_pictures = [ + '2019 - Parasite', + '2018 - Green Book', + '2017 - The Shape of Water', + '2016 - Moonlight', + '2015 - Spotlight', + '2014 - Birdman', + '2013 - 12 Years a Slave', + '2012 - Argo', + '2011 - The Artist' +] + +best_pictures.insert(0, '2024 - Anora') +best_pictures.insert(1, '2023 - Oppenheimer') +best_pictures.insert(2, '2022 - Everything Everywhere All at Once') +best_pictures.insert(3, '2021 - CODA') +best_pictures.insert(4, '2020 - Nomadland') + +print(best_pictures) diff --git a/python/5-Lists/4-Split-The-Ball.py b/python/5-Lists/4-Split-The-Ball.py new file mode 100644 index 0000000..32fbe68 --- /dev/null +++ b/python/5-Lists/4-Split-The-Ball.py @@ -0,0 +1,10 @@ +bill = [13.99, 28.75, 9.99, 9.99, 6.95, 7.45, 16.45, 16.45] + +total = 0 + +for item in bill: + total += item + +my_share = total / 4 + +print(my_share) diff --git a/python/5-Lists/5-DNA.py b/python/5-Lists/5-DNA.py new file mode 100644 index 0000000..32a0b6e --- /dev/null +++ b/python/5-Lists/5-DNA.py @@ -0,0 +1,13 @@ +dna_sequence = ['GCT', 'AGC', 'AGG', 'TAA', 'ACT', 'CAT', 'TAT', 'CCC', 'ACG', 'GAA', 'ACC', 'GGA'] + +item_to_find = 'CAT' +item_found = False + +for item in dna_sequence: + if item == item_to_find: + item_found = True + +if item_found: + print("Item Found!") +else: + print("Item not found.") diff --git a/python/control-flow/1-food-ratings.py b/python/control-flow/1-food-ratings.py deleted file mode 100644 index 297e8e2..0000000 --- a/python/control-flow/1-food-ratings.py +++ /dev/null @@ -1,14 +0,0 @@ -# โญ๏ธ Food Ratings - -rating = 4.3 - -if rating > 4.5: - print('Extraordinary') -elif rating > 4: - print('Excellent') -elif rating > 3: - print('Good') -elif rating > 2: - print('Fair') -else: - print('Poor') \ No newline at end of file diff --git a/python/control-flow/3-snapple-facts.py b/python/control-flow/3-snapple-facts.py deleted file mode 100644 index f3c6024..0000000 --- a/python/control-flow/3-snapple-facts.py +++ /dev/null @@ -1,18 +0,0 @@ -# ๐Ÿคฏ Snapple Facts - -import random - -num = random.randint(0, 5) - -if num == 0: - print('Flamingos turn pink from eating shrimp.') -elif num == 1: - print('The only food that doesn\'t spoil is honey.') -elif num == 2: - print('Shrimp can only swim backwards.') -elif num == 3: - print('A taste bud\'s life span is about 10 days.') -elif num == 4: - print('It is impossible to sneeze while sleeping.') -else: - print('It is illegal to sing off-key in North Carolina.') \ No newline at end of file diff --git a/python/control-flow/4-seasons-of-the-year.py b/python/control-flow/4-seasons-of-the-year.py deleted file mode 100644 index 483e22a..0000000 --- a/python/control-flow/4-seasons-of-the-year.py +++ /dev/null @@ -1,14 +0,0 @@ -# ๐Ÿ—“๏ธ Seasons of the Year - -month = int(input('What is the current month?: ')) - -if month == 1 or month == 2 or month == 3: - print('Winter ๐ŸŒจ๏ธ') -elif month == 4 or month == 5 or month == 6: - print('Spring ๐ŸŒฑ') -elif month == 7 or month == 8 or month == 9: - print('Summer ๐ŸŒป') -elif month == 10 or month == 11 or month == 12: - print('Autumn ๐Ÿ‚') -else: - print('Invalid') \ No newline at end of file diff --git a/python/control-flow/5-planet-weights.py b/python/control-flow/5-planet-weights.py deleted file mode 100644 index 1eabc6b..0000000 --- a/python/control-flow/5-planet-weights.py +++ /dev/null @@ -1,28 +0,0 @@ -# ๐Ÿง‘โ€๐Ÿš€ Planet Weights - -weight = float(input('Enter your weight: ')) -planet = int(input('Enter the planet number: ')) - -if planet == 1: - weight = weight * 0.38 - print(weight) -elif planet == 2: - weight = weight * 0.91 - print(weight) -elif planet == 3: - weight = weight * 0.38 - print(weight) -elif planet == 4: - weight = weight * 2.53 - print(weight) -elif planet == 5: - weight = weight * 1.07 - print(weight) -elif planet == 6: - weight = weight * 0.89 - print(weight) -elif planet == 7: - weight = weight * 1.14 - print(weight) -else: - print('Invalid planet number') \ No newline at end of file