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 @@ + + +
+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 @@ + + + +โญโญโญโญโญ
+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 @@ + + + +
+ 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 @@ + + + +
+ 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.
+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 @@ + + + +
+ Check out Alex's favorite podcast: The Joe Rogan Experience
+Heavy coats, sweaters, thermal layers, scarves, beanies, and gloves to keep warm during cold months.
+Light t-shirts, shorts, sandals, tank tops, and sunhats perfect for warm weather and outdoor activities.
+Acrylic Paint Set
-
+
Paint Brushes