Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 11 additions & 0 deletions Java/1-Control-Flow/1-Girl-Scout-Cookies.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
17 changes: 17 additions & 0 deletions Java/1-Control-Flow/2-Starbuck-Cups.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
20 changes: 20 additions & 0 deletions Java/1-Control-Flow/3-Tip-Calculator.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
12 changes: 12 additions & 0 deletions Java/1-Control-Flow/4-Work-Hours.java
Original file line number Diff line number Diff line change
@@ -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 🔴");
}
}
}
29 changes: 29 additions & 0 deletions Java/1-Control-Flow/5-Movie-Tickets.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
7 changes: 7 additions & 0 deletions Java/2-Loops/1-One-Mississippi.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
8 changes: 8 additions & 0 deletions Java/2-Loops/2-Ticketmaster-Queue.java
Original file line number Diff line number Diff line change
@@ -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!");
}
}
18 changes: 18 additions & 0 deletions Java/2-Loops/3-Safe-Word.java
Original file line number Diff line number Diff line change
@@ -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!");
}
}
18 changes: 18 additions & 0 deletions Java/2-Loops/4-Piggy-Bank.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
18 changes: 18 additions & 0 deletions Java/2-Loops/5-Maraton-Runner.java
Original file line number Diff line number Diff line change
@@ -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!");
}
}
7 changes: 7 additions & 0 deletions Javascript/1-Conditionals/1-Nite-Owl.js
Original file line number Diff line number Diff line change
@@ -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?");
}
11 changes: 11 additions & 0 deletions Javascript/1-Conditionals/2-Michelin-Stars.js
Original file line number Diff line number Diff line change
@@ -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.");
}
11 changes: 11 additions & 0 deletions Javascript/1-Conditionals/3-TGIF.js
Original file line number Diff line number Diff line change
@@ -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?");
}
15 changes: 15 additions & 0 deletions Javascript/1-Conditionals/4-Decades.js
Original file line number Diff line number Diff line change
@@ -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");
}
11 changes: 11 additions & 0 deletions Javascript/1-Conditionals/5-Fitness-Routine.js
Original file line number Diff line number Diff line change
@@ -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");
}
4 changes: 4 additions & 0 deletions Javascript/2-Loops/1-Blast-Off.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
for (let i = 10; i > 0; i--) {
console.log(i);
}
console.log("To infinity and beyond! 🚀");
16 changes: 16 additions & 0 deletions Javascript/2-Loops/2-Swag-Raffle.js
Original file line number Diff line number Diff line change
@@ -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.`);
8 changes: 8 additions & 0 deletions Javascript/2-Loops/3-Odd-Cubes.js
Original file line number Diff line number Diff line change
@@ -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);
15 changes: 15 additions & 0 deletions Javascript/2-Loops/4-Dice-Doubles.js
Original file line number Diff line number Diff line change
@@ -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}`);
12 changes: 12 additions & 0 deletions Javascript/2-Loops/5-Fibonacci-Sequence.js
Original file line number Diff line number Diff line change
@@ -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;
}
10 changes: 10 additions & 0 deletions html/1-Elements/1-Garage-Sale.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Garage Sale Listing</title>
</head>
<body>
<h1>Vintage Bicycle - $45</h1>
<p>Classic 1980s road bike in good working condition. Recently tuned up, ready to ride. Minor cosmetic wear but mechanically sound.</p>
</body>
</html>
11 changes: 11 additions & 0 deletions html/1-Elements/2-Movie-Review.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Movie Review</title>
</head>
<body>
<h1>Dune: Part Two (2024)</h1>
<p>⭐⭐⭐⭐⭐</p>
<p>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. 🎬</p>
</body>
</html>
17 changes: 17 additions & 0 deletions html/1-Elements/3-Packing-List.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Beach Packing List</title>
</head>
<body>
<ul>
<li>Sunscreen</li>
<li>Swimsuit</li>
<li>Sunglasses</li>
<li>Flip-flops</li>
<li>Towel</li>
<li>Hat or visor</li>
<li>Light cover-up</li>
</ul>
</body>
</html>
15 changes: 15 additions & 0 deletions html/1-Elements/4-Map-Direcitons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Directions to Coffee Shop</title>
</head>
<body>
<ol>
<li>Exit home and turn left on Main Street</li>
<li>Walk two blocks north</li>
<li>Turn right on Oak Avenue</li>
<li>Continue for one block</li>
<li>The coffee shop is on your left next to the bakery</li>
</ol>
</body>
</html>
11 changes: 11 additions & 0 deletions html/1-Elements/5-Ramen-Restaurant.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Ramen Menu</title>
</head>
<body>
<h2>Spicy Miso Ramen</h2>
<img src="ramen.jpg" alt="Spicy Miso Ramen">
<p>Rich miso broth with tender chashu pork, soft-boiled egg, bamboo shoots, and a spicy kick. Topped with green onions and sesame seeds.</p>
</body>
</html>
21 changes: 21 additions & 0 deletions html/1-Elements/6-For-Rent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Apartment Listing</title>
</head>
<body>
<h1>Modern Downtown Loft</h1>
<h2>Financial District - $2,500/month</h2>
<img src="apartment.jpg" alt="Modern Downtown Loft">
<p>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.</p>
<p>Walking distance to restaurants, shops, and public transportation. Perfect for professionals seeking urban living with convenience and style.</p>
<ul>
<li>Hardwood floors</li>
<li>Stainless steel appliances</li>
<li>In-unit laundry</li>
<li>Rooftop access</li>
<li>Pet-friendly</li>
</ul>
<a href="contact.html">Schedule a Tour</a>
</body>
</html>
Loading