diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d2.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d2.md new file mode 100644 index 00000000000..18304f999dc --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d2.md @@ -0,0 +1,97 @@ +--- +id: 68c1a929005bf54d342aa8d2 +title: "Challenge 55: Space Week Day 1: Stellar Classification" +challengeType: 28 +dashedName: challenge-55 +--- + +# --description-- + +October 4th marks the beginning of World Space Week. The next seven days will bring you astronomy-themed coding challenges. + +For today's challenge, you are given the surface temperature of a star in Kelvin (K) and need to determine its stellar classification based on the following ranges: + +- `"O"`: 30,000 K or higher +- `"B"`: 10,000 K - 29,999 K +- `"A"`: 7,500 K - 9,999 K +- `"F"`: 6,000 K - 7,499 K +- `"G"`: 5,200 K - 5,999 K +- `"K"`: 3,700 K - 5,199 K +- `"M"`: 0 K - 3,699 K + +- Return the classification of the given star. + +# --hints-- + +`classification(5778)` should return `"G"`. + +```js +assert.equal(classification(5778), "G"); +``` + +`classification(2400)` should return `"M"`. + +```js +assert.equal(classification(2400), "M"); +``` + +`classification(9999)` should return `"A"`. + +```js +assert.equal(classification(9999), "A"); +``` + +`classification(3700)` should return `"K"`. + +```js +assert.equal(classification(3700), "K"); +``` + +`classification(3699)` should return `"M"`. + +```js +assert.equal(classification(3699), "M"); +``` + +`classification(210000)` should return `"O"`. + +```js +assert.equal(classification(210000), "O"); +``` + +`classification(6000)` should return `"F"`. + +```js +assert.equal(classification(6000), "F"); +``` + +`classification(11432)` should return `"B"`. + +```js +assert.equal(classification(11432), "B"); +``` + +# --seed-- + +## --seed-contents-- + +```js +function classification(temp) { + + return temp; +} +``` + +# --solutions-- + +```js +function classification(temp) { + if (temp >= 30000) return "O"; + if (temp >= 10000) return "B"; + if (temp >= 7500) return "A"; + if (temp >= 6000) return "F"; + if (temp >= 5200) return "G"; + if (temp >= 3700) return "K"; + return "M"; +} +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d3.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d3.md new file mode 100644 index 00000000000..6d4faa69338 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d3.md @@ -0,0 +1,80 @@ +--- +id: 68c1a929005bf54d342aa8d3 +title: "Challenge 56: Space Week Day 2: Exoplanet Search" +challengeType: 28 +dashedName: challenge-56 +--- + +# --description-- + +For the second day of Space Week, you are given a string where each character represents the luminosity reading of a star. Determine if the readings have detected an exoplanet using the transit method. The transit method is when a planet passes in front of a star, reducing its observed luminosity. + +- Luminosity readings only comprise of characters `0-9` and `A-Z` where each reading corresponds to the following numerical values: +- Characters `0-9` correspond to luminosity levels `0-9`. +- Characters `A-Z` correspond to luminosity levels `10-35`. + +A star is considered to have an exoplanet if any single reading is less than or equal to 80% of the average of all readings. For example, if the average luminosity of a star is 10, it would be considered to have a exoplanet if any single reading is 8 or less. + +# --hints-- + +`hasExoplanet("665544554")` should return `false`. + +```js +assert.isFalse(hasExoplanet("665544554")); +``` + +`hasExoplanet("FGFFCFFGG")` should return `true`. + +```js +assert.isTrue(hasExoplanet("FGFFCFFGG")); +``` + +`hasExoplanet("MONOPLONOMONPLNOMPNOMP")` should return `false`. + +```js +assert.isFalse(hasExoplanet("MONOPLONOMONPLNOMPNOMP")); +``` + +`hasExoplanet("FREECODECAMP")` should return `true`. + +```js +assert.isTrue(hasExoplanet("FREECODECAMP")); +``` + +`hasExoplanet("9AB98AB9BC98A")` should return `false`. + +```js +assert.isFalse(hasExoplanet("9AB98AB9BC98A")); +``` + +`hasExoplanet("ZXXWYZXYWYXZEGZXWYZXYGEE")` should return `true`. + +```js +assert.isTrue(hasExoplanet("ZXXWYZXYWYXZEGZXWYZXYGEE")); +``` + +# --seed-- + +## --seed-contents-- + +```js +function hasExoplanet(readings) { + + return readings +} +``` + +# --solutions-- + +```js +function hasExoplanet(readings) { + let total = 0; + const values = readings.split('').map(c => parseInt(c, 36)); + + total = values.reduce((sum, v) => sum + v, 0); + const average = total / values.length; + const threshold = average * 0.8; + + return values.some(v => v <= threshold); +} +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d4.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d4.md new file mode 100644 index 00000000000..213c269612e --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d4.md @@ -0,0 +1,79 @@ +--- +id: 68c1a929005bf54d342aa8d4 +title: "Challenge 57: Space Week Day 3: Phone Home" +challengeType: 28 +dashedName: challenge-57 +--- + +# --description-- + +For day three of Space Week, you are given an array of numbers representing distances (in kilometers) between youself, satellites, and your home planet in a communication route. Determine how long it will take a message sent through the route to reach its destination planet using the following constraints: + +- The first value in the array is the distance from your location to the first satellite. +- Each subsequent value, except for the last, is the distance to the next satellite. +- The last value in the array is the distance from the previous satellite to your home planet. +- The message travels at 300,000 km/s. +- Each satellite the message **passes through** adds a 0.5 second transmission delay. +- Return a number rounded to 4 decimal places, with trailing zeros removed. + +# --hints-- + +`sendMessage([300000, 300000])` should return `2.5`. + +```js +assert.equal(sendMessage([300000, 300000]), 2.5); +``` + +`sendMessage([384400, 384400])` should return `3.0627`. + +```js +assert.equal(sendMessage([384400, 384400]), 3.0627); +``` + +`sendMessage([54600000, 54600000])` should return `364.5`. + +```js +assert.equal(sendMessage([54600000, 54600000]), 364.5); +``` + +`sendMessage([1000000, 500000000, 1000000])` should return `1674.3333`. + +```js +assert.equal(sendMessage([1000000, 500000000, 1000000]), 1674.3333); +``` + +`sendMessage([10000, 21339, 50000, 31243, 10000])` should return `2.4086`. + +```js +assert.equal(sendMessage([10000, 21339, 50000, 31243, 10000]), 2.4086); +``` + +`sendMessage([802101, 725994, 112808, 3625770, 481239])` should return `21.1597`. + +```js +assert.equal(sendMessage([802101, 725994, 112808, 3625770, 481239]), 21.1597); +``` + +# --seed-- + +## --seed-contents-- + +```js +function sendMessage(route) { + + return route; +} +``` + +# --solutions-- + +```js +function sendMessage(route) { + let totalDistance = route.reduce((a, d) => a += d, 0); + + const delay = (route.length - 1) * 0.5 + const time = totalDistance / 300000 + const total = time + delay; + return Number(total.toFixed(4)) +} +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d5.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d5.md new file mode 100644 index 00000000000..442b0eecda3 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d5.md @@ -0,0 +1,95 @@ +--- +id: 68c1a929005bf54d342aa8d5 +title: "Challenge 58: Space Week Day 4: Landing Spot" +challengeType: 28 +dashedName: challenge-58 +--- + +# --description-- + +In day four of Space Week, you are given a matrix of numbers (an array of arrays), representing potential landing spots for your rover. Find the safest landing spot based on the following rules: + +- Each spot in the matrix will contain a number from `0-9`, inclusive. +- Any `0` represents a potential landing spot. +- Any number other than `0` is too dangerous to land. The higher the number, the more dangerous. +- The safest spot is defined as the `0` cell whose surrounding cells (up to 4 neighbors, ignore diagonals) have the lowest total danger. +- Ignore out-of-bounds neighbors (corners and edges just have fewer neighbors). +- Return the indicies of the safest landing spot. There will always only be one safest spot. + +For instance, given: + +```js +[ + [1, 0], + [2, 0] +] +``` + +Return `[0, 1]`, the indicies for the `0` in the first array. + +# --hints-- + +`findLandingSpot([[1, 0], [2, 0]])` should return `[0, 1]`. + +```js +assert.deepEqual(findLandingSpot([[1, 0], [2, 0]]), [0, 1]); +``` + +`findLandingSpot([[9, 0, 3], [7, 0, 4], [8, 0, 5]])` should return `[1, 1]`. + +```js +assert.deepEqual(findLandingSpot([[9, 0, 3], [7, 0, 4], [8, 0, 5]]), [1, 1]); +``` + +`findLandingSpot([[1, 2, 1], [0, 0, 2], [3, 0, 0]])` should return `[2, 2]`. + +```js +assert.deepEqual(findLandingSpot([[1, 2, 1], [0, 0, 2], [3, 0, 0]]), [2, 2]); +``` + +`findLandingSpot([[9, 6, 0, 8], [7, 1, 1, 0], [3, 0, 3, 9], [8, 6, 0, 9]])` should return `[2, 1]`. + +```js +assert.deepEqual(findLandingSpot([[9, 6, 0, 8], [7, 1, 1, 0], [3, 0, 3, 9], [8, 6, 0, 9]]), [2, 1]); +``` + +# --seed-- + +## --seed-contents-- + +```js +function findLandingSpot(matrix) { + + return matrix; +} +``` + +# --solutions-- + +```js +function findLandingSpot(matrix) { + let bestSpot = null; + let lowestNeighborSum = Infinity; + + for (let i = 0; i < matrix.length; i++) { + for (let j = 0; j < matrix[i].length; j++) { + + if (matrix[i][j] === 0) { + let currentNeighborSum = 0; + + if (i > 0) currentNeighborSum += matrix[i - 1][j]; + if (j < matrix[i].length - 1) currentNeighborSum += matrix[i][j + 1]; + if (i < matrix.length - 1) currentNeighborSum += matrix[i + 1][j]; + if (j > 0) currentNeighborSum += matrix[i][j - 1]; + + if (currentNeighborSum < lowestNeighborSum) { + lowestNeighborSum = currentNeighborSum; + bestSpot = [i, j]; + } + } + } + } + + return bestSpot; +} +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d6.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d6.md new file mode 100644 index 00000000000..8d16a5bb54d --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c1a929005bf54d342aa8d6.md @@ -0,0 +1,76 @@ +--- +id: 68c1a929005bf54d342aa8d6 +title: "Challenge 59: Space Week Day 5: Goldilocks Zone" +challengeType: 28 +dashedName: challenge-59 +--- + +# --description-- + +For the fifth day of Space Week, you will calculate the "Goldilocks zone" of a star - the region around a star where conditions are "just right" for liquid water to exist. + +Given the mass of a star, return an array with the start and end distances of its Goldilocks Zone in Astronomical Units. + +To calculate the Goldilocks Zone: + +1. Find the luminosity of the star by raising its mass to the power of 3.5. +2. The start of the zone is 0.95 times the square root of its luminosity. +3. The end of the zone is 1.37 times the square root of its luminosity. + +- Return the distances rounded to two decimal places. + +For example, given `1` as a mass, return `[0.95, 1.37]`. + +# --hints-- + +`goldilocksZone(1)` should return `[0.95, 1.37]`. + +```js +assert.deepEqual(goldilocksZone(1), [0.95, 1.37]); +``` + +`goldilocksZone(0.5)` should return `[0.28, 0.41]`. + +```js +assert.deepEqual(goldilocksZone(0.5), [0.28, 0.41]); +``` + +`goldilocksZone(6)` should return `[21.85, 31.51]`. + +```js +assert.deepEqual(goldilocksZone(6), [21.85, 31.51]); +``` + +`goldilocksZone(3.7)` should return `[9.38, 13.52]`. + +```js +assert.deepEqual(goldilocksZone(3.7), [9.38, 13.52]); +``` + +`goldilocksZone(20)` should return `[179.69, 259.13]`. + +```js +assert.deepEqual(goldilocksZone(20), [179.69, 259.13]); +``` + +# --seed-- + +## --seed-contents-- + +```js +function goldilocksZone(mass) { + + return mass; +} +``` + +# --solutions-- + +```js +function goldilocksZone(mass) { + const luminosity = Math.pow(mass, 3.5); + const start = 0.95 * Math.sqrt(luminosity); + const end = 1.37 * Math.sqrt(luminosity); + return [Number(start.toFixed(2)), Number(end.toFixed(2))]; +} +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e24.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e24.md new file mode 100644 index 00000000000..e8e010bdec1 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e24.md @@ -0,0 +1,90 @@ +--- +id: 68c497f3aaefc9fd9f1b0e24 +title: "Challenge 60: Space Week Day 6: Moon Phase" +challengeType: 28 +dashedName: challenge-60 +--- + +# --description-- + +For day six of Space Week, you will be given a date in the format `"YYYY-MM-DD"` and need to determine the phase of the moon for that day using the following rules: + +Use a simplified lunar cycle of 28 days, divided into four equal phases: + +- `"New"`: days 1 - 7 +- `"Waxing"`: days 8 - 14 +- `"Full"`: days 15 - 21 +- `"Waning"`: days 22 - 28 + +After day 28, the cycle repeats with day 1, a new moon. + +- Use `"2000-01-06"` as a reference new moon (day 1 of the cycle) to determine the phase of the given day. +- You will not be given any dates before the reference date. +- Return the correct phase as a string. + +# --hints-- + +`moonPhase("2000-01-12")` should return `"New"`. + +```js +assert.equal(moonPhase("2000-01-12"), "New"); +``` + +`moonPhase("2000-01-13")` should return `"Waxing"`. + +```js +assert.equal(moonPhase("2000-01-13"), "Waxing"); +``` + +`moonPhase("2014-10-15")` should return `"Full"`. + +```js +assert.equal(moonPhase("2014-10-15"), "Full"); +``` + +`moonPhase("2012-10-21")` should return `"Waning"`. + +```js +assert.equal(moonPhase("2012-10-21"), "Waning"); +``` + +`moonPhase("2022-12-14")` should return `"New"`. + +```js +assert.equal(moonPhase("2022-12-14"), "New"); +``` + +# --seed-- + +## --seed-contents-- + +```js +function moonPhase(dateString) { + + return dateString; +} +``` + +# --solutions-- + +```js +function moonPhase(dateString) { + const ONE_DAY_IN_MS = 1000 * 60 * 60 * 24; + const refDate = new Date("2000-01-06"); + const targetDate = new Date(dateString); + const diffMs = targetDate - refDate; + const diffDays = diffMs / ONE_DAY_IN_MS; + const phaseDay = (diffDays % 28 + 1); + + if (phaseDay <= 7) { + return "New"; + } else if (phaseDay <= 14) { + return "Waxing"; + } else if (phaseDay <= 21) { + return "Full" + } else { + return "Waning"; + } +} + +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e25.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e25.md new file mode 100644 index 00000000000..3e17a6389ba --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e25.md @@ -0,0 +1,80 @@ +--- +id: 68c497f3aaefc9fd9f1b0e25 +title: "Challenge 61: Space Week Day 7: Launch Fuel" +challengeType: 28 +dashedName: challenge-61 +--- + +# --description-- + +For the final day of Space Week, you will be given the mass in kilograms (kg) of a payload you want to send to orbit. Determine the amount of fuel needed to send your payload to orbit using the following rules: + +- Rockets require 1 kg of fuel per 5 kg of mass they must lift. +- Fuel itself has mass. So when you add fuel, the mass to lift goes up, which requires more fuel, which increases the mass, and so on. +- To calculate the total fuel needed: start with the payload mass, calculate the fuel needed for that, add that fuel to the total mass, and calculate again. Repeat this process until the additional fuel required is less than 1 kg, then stop. +- Ignore the mass of the rocket itself. Only compute fuel needed to lift the payload and its own fuel. + +For example, given a payload mass of 50 kg, you would need 10 kg of fuel to lift it (payload / 5), which increases the total mass to 60 kg, which needs 12 kg to lift (2 additional kg), which increases the total mass to 62 kg, which needs 12.4 kg to lift - 0.4 additional kg - which is less 1 additional kg, so we stop here. The total mass to lift is 62.4 kg, 50 of which is the initial payload and 12.4 of fuel. + +- Return the amount of fuel needed rounded to one decimal place. + +# --hints-- + +`launchFuel(50)` should return `12.4`. + +```js +assert.equal(launchFuel(50), 12.4); +``` + +`launchFuel(500)` should return `124.8`. + +```js +assert.equal(launchFuel(500), 124.8); +``` + +`launchFuel(243)` should return `60.7`. + +```js +assert.equal(launchFuel(243), 60.7); +``` + +`launchFuel(11000)` should return `2749.8`. + +```js +assert.equal(launchFuel(11000), 2749.8); +``` + +`launchFuel(6214)` should return `1553.4`. + +```js +assert.equal(launchFuel(6214), 1553.4); +``` + +# --seed-- + +## --seed-contents-- + +```js +function launchFuel(payload) { + + return payload; +} +``` + +# --solutions-- + +```js +function launchFuel(payload) { + let totalMass = payload; + let additionalFuel = totalMass / 5; + let totalFuel = additionalFuel; + + while (additionalFuel >= 1) { + totalMass += additionalFuel; + additionalFuel = (totalMass / 5) - totalFuel; + totalFuel += additionalFuel; + } + + return Number(totalFuel.toFixed(1)); +} +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e26.md b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e26.md new file mode 100644 index 00000000000..f1f74a635d7 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/68c497f3aaefc9fd9f1b0e26.md @@ -0,0 +1,88 @@ +--- +id: 68c497f3aaefc9fd9f1b0e26 +title: "Challenge 62: Hex to Decimal" +challengeType: 28 +dashedName: challenge-62 +--- + +# --description-- + +Given a string representing a hexadecimal number (base 16), return its decimal (base 10) value as an integer. + +Hexadecimal is a number system that uses 16 digits: + +- `0-9` represent values `0` through `9`. +- `A-F` represent values `10` through `15`. + +Here's a partial conversion table: + +| Hexadecimal | Decimal | +|:-----------:|:-------:| +| 0 | 0 | +| 1 | 1 | +| ... | ... | +| 9 | 9 | +| A | 10 | +| ... | ... | +| F | 15 | +| 10 | 16 | +| ... | ... | +| 9F | 159 | +| A0 | 160 | +| ... | ... | +| FF | 255 | +| 100 | 256 | + +- The string will only contain characters `0–9` and `A–F`. + +# --hints-- + +`hexToDecimal("A")` should return `10`. + +```js +assert.equal(hexToDecimal("A"), 10); +``` + +`hexToDecimal("15")` should return `21`. + +```js +assert.equal(hexToDecimal("15"), 21); +``` + +`hexToDecimal("2E")` should return `46`. + +```js +assert.equal(hexToDecimal("2E"), 46); +``` + +`hexToDecimal("FF")` should return `255`. + +```js +assert.equal(hexToDecimal("FF"), 255); +``` + +`hexToDecimal("A3F")` should return `2623`. + +```js +assert.equal(hexToDecimal("A3F"), 2623); +``` + +# --seed-- + +## --seed-contents-- + +```js +function hexToDecimal(hex) { + + return hex; +} +``` + +# --solutions-- + +```js +function hexToDecimal(hex) { + + return parseInt(hex, 16); +} +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d2.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d2.md new file mode 100644 index 00000000000..8821a97a0e7 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d2.md @@ -0,0 +1,126 @@ +--- +id: 68c1a929005bf54d342aa8d2 +title: "Challenge 55: Space Week Day 1: Stellar Classification" +challengeType: 29 +dashedName: challenge-55 +--- + +# --description-- + +October 4th marks the beginning of World Space Week. The next seven days will bring you astronomy-themed coding challenges. + +For today's challenge, you are given the surface temperature of a star in Kelvin (K) and need to determine its stellar classification based on the following ranges: + +- `"O"`: 30,000 K or higher +- `"B"`: 10,000 K - 29,999 K +- `"A"`: 7,500 K - 9,999 K +- `"F"`: 6,000 K - 7,499 K +- `"G"`: 5,200 K - 5,999 K +- `"K"`: 3,700 K - 5,199 K +- `"M"`: 0 K - 3,699 K + +- Return the classification of the given star. + +# --hints-- + +`classification(5778)` should return `"G"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(5778), "G")`) +}}) +``` + +`classification(2400)` should return `"M"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(2400), "M")`) +}}) +``` + +`classification(9999)` should return `"A"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(9999), "A")`) +}}) +``` + +`classification(3700)` should return `"K"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(3700), "K")`) +}}) +``` + +`classification(3699)` should return `"M"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(3699), "M")`) +}}) +``` + +`classification(210000)` should return `"O"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(210000), "O")`) +}}) +``` + +`classification(6000)` should return `"F"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(6000), "F")`) +}}) +``` + +`classification(11432)` should return `"B"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(classification(11432), "B")`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def placeholder(arg): + + return arg +``` + +# --solutions-- + +```py +def classification(temp): + if temp >= 30000: + return "O" + elif temp >= 10000: + return "B" + elif temp >= 7500: + return "A" + elif temp >= 6000: + return "F" + elif temp >= 5200: + return "G" + elif temp >= 3700: + return "K" + else: + return "M" +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d3.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d3.md new file mode 100644 index 00000000000..b387a1a3f96 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d3.md @@ -0,0 +1,95 @@ +--- +id: 68c1a929005bf54d342aa8d3 +title: "Challenge 56: Space Week Day 2: Exoplanet Search" +challengeType: 29 +dashedName: challenge-56 +--- + +# --description-- + +For the second day of Space Week, you are given a string where each character represents the luminosity reading of a star. Determine if the readings have detected an exoplanet using the transit method. The transit method is when a planet passes in front of a star, reducing its observed luminosity. + +- Luminosity readings only comprise of characters `0-9` and `A-Z` where each reading corresponds to the following numerical values: +- Characters `0-9` correspond to luminosity levels `0-9`. +- Characters `A-Z` correspond to luminosity levels `10-35`. + +A star is considered to have an exoplanet if any single reading is less than or equal to 80% of the average of all readings. For example, if the average luminosity of a star is 10, it would be considered to have a exoplanet if any single reading is 8 or less. + +# --hints-- + +`has_exoplanet("665544554")` should return `False`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertIs(has_exoplanet("665544554"), False)`) +}}) +``` + +`has_exoplanet("FGFFCFFGG")` should return `True`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertIs(has_exoplanet("FGFFCFFGG"), True)`) +}}) +``` + +`has_exoplanet("MONOPLONOMONPLNOMPNOMP")` should return `False`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertIs(has_exoplanet("MONOPLONOMONPLNOMPNOMP"), False)`) +}}) +``` + +`has_exoplanet("FREECODECAMP")` should return `True`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertIs(has_exoplanet("FREECODECAMP"), True)`) +}}) +``` + +`has_exoplanet("9AB98AB9BC98A")` should return `False`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertIs(has_exoplanet("9AB98AB9BC98A"), False)`) +}}) +``` + +`has_exoplanet("ZXXWYZXYWYXZEGZXWYZXYGEE")` should return `True`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertIs(has_exoplanet("ZXXWYZXYWYXZEGZXWYZXYGEE"), True)`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def has_exoplanet(readings): + + return readings +``` + +# --solutions-- + +```py +def has_exoplanet(readings): + values = [int(c, 36) for c in readings] + average = sum(values) / len(values) + threshold = average * 0.8 + for v in values: + if v <= threshold: + return True + return False +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d4.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d4.md new file mode 100644 index 00000000000..dc53d4a2a2f --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d4.md @@ -0,0 +1,94 @@ +--- +id: 68c1a929005bf54d342aa8d4 +title: "Challenge 57: Space Week Day 3: Phone Home" +challengeType: 29 +dashedName: challenge-57 +--- + +# --description-- + +For day three of Space Week, you are given an array of numbers representing distances (in kilometers) between youself, satellites, and your home planet in a communication route. Determine how long it will take a message sent through the route to reach its destination planet using the following constraints: + +- The first value in the array is the distance from your location to the first satellite. +- Each subsequent value, except for the last, is the distance to the next satellite. +- The last value in the array is the distance from the previous satellite to your home planet. +- The message travels at 300,000 km/s. +- Each satellite the message **passes through** adds a 0.5 second transmission delay. +- Return a number rounded to 4 decimal places, with trailing zeros removed. + +# --hints-- + +`send_message([300000, 300000])` should return `2.5`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(send_message([300000, 300000]), 2.5)`) +}}) +``` + +`send_message([384400, 384400])` should return `3.0627`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(send_message([384400, 384400]), 3.0627)`) +}}) +``` + +`send_message([54600000, 54600000])` should return `364.5`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(send_message([54600000, 54600000]), 364.5)`) +}}) +``` + +`send_message([1000000, 500000000, 1000000])` should return `1674.3333`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(send_message([1000000, 500000000, 1000000]), 1674.3333)`) +}}) +``` + +`send_message([10000, 21339, 50000, 31243, 10000])` should return `2.4086`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(send_message([10000, 21339, 50000, 31243, 10000]), 2.4086)`) +}}) +``` + +`send_message([802101, 725994, 112808, 3625770, 481239])` should return `21.1597`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(send_message([802101, 725994, 112808, 3625770, 481239]), 21.1597)`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def send_message(route): + + return route +``` + +# --solutions-- + +```py +def send_message(route): + total_distance = sum(route) + delay = (len(route) - 1) * 0.5 + time = total_distance / 300_000 + total = time + delay + return round(total, 4) +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d5.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d5.md new file mode 100644 index 00000000000..3824ba74064 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d5.md @@ -0,0 +1,104 @@ +--- +id: 68c1a929005bf54d342aa8d5 +title: "Challenge 58: Space Week Day 4: Landing Spot" +challengeType: 29 +dashedName: challenge-58 +--- + +# --description-- + +In day four of Space Week, you are given a matrix of numbers (an array of arrays), representing potential landing spots for your rover. Find the safest landing spot based on the following rules: + +- Each spot in the matrix will contain a number from `0-9`, inclusive. +- Any `0` represents a potential landing spot. +- Any number other than `0` is too dangerous to land. The higher the number, the more dangerous. +- The safest spot is defined as the `0` cell whose surrounding cells (up to 4 neighbors, ignore diagonals) have the lowest total danger. +- Ignore out-of-bounds neighbors (corners and edges just have fewer neighbors). +- Return the indicies of the safest landing spot. There will always only be one safest spot. + +For instance, given: + +```js +[ + [1, 0], + [2, 0] +] +``` + +Return `[0, 1]`, the indicies for the `0` in the first array. + +# --hints-- + +`find_landing_spot([[1, 0], [2, 0]])` should return `[0, 1]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(find_landing_spot([[1, 0], [2, 0]]), [0, 1])`) +}}) +``` + +`find_landing_spot([[9, 0, 3], [7, 0, 4], [8, 0, 5]])` should return `[1, 1]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(find_landing_spot([[9, 0, 3], [7, 0, 4], [8, 0, 5]]), [1, 1])`) +}}) +``` + +`find_landing_spot([[1, 2, 1], [0, 0, 2], [3, 0, 0]])` should return `[2, 2]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(find_landing_spot([[1, 2, 1], [0, 0, 2], [3, 0, 0]]), [2, 2])`) +}}) +``` + +`find_landing_spot([[9, 6, 0, 8], [7, 1, 1, 0], [3, 0, 3, 9], [8, 6, 0, 9]])` should return `[2, 1]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(find_landing_spot([[9, 6, 0, 8], [7, 1, 1, 0], [3, 0, 3, 9], [8, 6, 0, 9]]), [2, 1])`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def find_landing_spot(matrix): + + return matrix +``` + +# --solutions-- + +```py +def find_landing_spot(matrix): + best_spot = None + lowest_neighbor_sum = float('inf') + + for i in range(len(matrix)): + for j in range(len(matrix[i])): + if matrix[i][j] == 0: + current_neighbor_sum = 0 + + if i > 0: + current_neighbor_sum += matrix[i - 1][j] + if j < len(matrix[i]) - 1: + current_neighbor_sum += matrix[i][j + 1] + if i < len(matrix) - 1: + current_neighbor_sum += matrix[i + 1][j] + if j > 0: + current_neighbor_sum += matrix[i][j - 1] + + if current_neighbor_sum < lowest_neighbor_sum: + lowest_neighbor_sum = current_neighbor_sum + best_spot = [i, j] + + return best_spot +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d6.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d6.md new file mode 100644 index 00000000000..04e0c2bdfcc --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c1a929005bf54d342aa8d6.md @@ -0,0 +1,90 @@ +--- +id: 68c1a929005bf54d342aa8d6 +title: "Challenge 59: Space Week Day 5: Goldilocks Zone" +challengeType: 29 +dashedName: challenge-59 +--- + +# --description-- + +For the fifth day of Space Week, you will calculate the "Goldilocks zone" of a star - the region around a star where conditions are "just right" for liquid water to exist. + +Given the mass of a star, return an array with the start and end distances of its Goldilocks Zone in Astronomical Units. + +To calculate the Goldilocks Zone: + +1. Find the luminosity of the star by raising its mass to the power of 3.5. +2. The start of the zone is 0.95 times the square root of its luminosity. +3. The end of the zone is 1.37 times the square root of its luminosity. + +- Return the distances rounded to two decimal places. + +For example, given `1` as a mass, return `[0.95, 1.37]`. + +# --hints-- + +`goldilocks_zone(1)` should return `[0.95, 1.37]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(goldilocks_zone(1), [0.95, 1.37])`) +}}) +``` + +`goldilocks_zone(0.5)` should return `[0.28, 0.41]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(goldilocks_zone(0.5), [0.28, 0.41])`) +}}) +``` + +`goldilocks_zone(6)` should return `[21.85, 31.51]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(goldilocks_zone(6), [21.85, 31.51])`) +}}) +``` + +`goldilocks_zone(3.7)` should return `[9.38, 13.52]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(goldilocks_zone(3.7), [9.38, 13.52])`) +}}) +``` + +`goldilocks_zone(20)` should return `[179.69, 259.13]`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(goldilocks_zone(20), [179.69, 259.13])`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def goldilocks_zone(mass): + + return mass +``` + +# --solutions-- + +```py +import math +def goldilocks_zone(mass): + luminosity = mass ** 3.5 + start = 0.95 * math.sqrt(luminosity) + end = 1.37 * math.sqrt(luminosity) + return [round(start, 2), round(end, 2)] +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e24.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e24.md new file mode 100644 index 00000000000..f7ce71e6412 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e24.md @@ -0,0 +1,101 @@ +--- +id: 68c497f3aaefc9fd9f1b0e24 +title: "Challenge 60: Space Week Day 6: Moon Phase" +challengeType: 29 +dashedName: challenge-60 +--- + +# --description-- + +For day six of Space Week, you will be given a date in the format `"YYYY-MM-DD"` and need to determine the phase of the moon for that day using the following rules: + +Use a simplified lunar cycle of 28 days, divided into four equal phases: + +- `"New"`: days 1 - 7 +- `"Waxing"`: days 8 - 14 +- `"Full"`: days 15 - 21 +- `"Waning"`: days 22 - 28 + +After day 28, the cycle repeats with day 1, a new moon. + +- Use `"2000-01-06"` as a reference new moon (day 1 of the cycle) to determine the phase of the given day. +- You will not be given any dates before the reference date. +- Return the correct phase as a string. + +# --hints-- + +`moon_phase("2000-01-12")` should return `"New"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(moon_phase("2000-01-12"), "New")`) +}}) +``` + +`moon_phase("2000-01-13")` should return `"Waxing"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(moon_phase("2000-01-13"), "Waxing")`) +}}) +``` + +`moon_phase("2014-10-15")` should return `"Full"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(moon_phase("2014-10-15"), "Full")`) +}}) +``` + +`moon_phase("2012-10-21")` should return `"Waning"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(moon_phase("2012-10-21"), "Waning")`) +}}) +``` + +`moon_phase("2022-12-14")` should return `"New"`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(moon_phase("2022-12-14"), "New")`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def moon_phase(date_string): + + return date_string +``` + +# --solutions-- + +```py +from datetime import datetime +def moon_phase(date_string): + ref_date = datetime.strptime("2000-01-06", "%Y-%m-%d") + target_date = datetime.strptime(date_string, "%Y-%m-%d") + + diff_days = (target_date - ref_date).days + cycle_day = (diff_days % 28) + 1 + + if cycle_day <= 7: + return "New" + elif cycle_day <= 14: + return "Waxing" + elif cycle_day <= 21: + return "Full" + else: + return "Waning" +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e25.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e25.md new file mode 100644 index 00000000000..82ad5f6caa5 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e25.md @@ -0,0 +1,92 @@ +--- +id: 68c497f3aaefc9fd9f1b0e25 +title: "Challenge 61: Space Week Day 7: Launch Fuel" +challengeType: 29 +dashedName: challenge-61 +--- + +# --description-- + +For the final day of Space Week, you will be given the mass in kilograms (kg) of a payload you want to send to orbit. Determine the amount of fuel needed to send your payload to orbit using the following rules: + +- Rockets require 1 kg of fuel per 5 kg of mass they must lift. +- Fuel itself has mass. So when you add fuel, the mass to lift goes up, which requires more fuel, which increases the mass, and so on. +- To calculate the total fuel needed: start with the payload mass, calculate the fuel needed for that, add that fuel to the total mass, and calculate again. Repeat this process until the additional fuel required is less than 1 kg, then stop. +- Ignore the mass of the rocket itself. Only compute fuel needed to lift the payload and its own fuel. + +For example, given a payload mass of 50 kg, you would need 10 kg of fuel to lift it (payload / 5), which increases the total mass to 60 kg, which needs 12 kg to lift (2 additional kg), which increases the total mass to 62 kg, which needs 12.4 kg to lift - 0.4 additional kg - which is less 1 additional kg, so we stop here. The total mass to lift is 62.4 kg, 50 of which is the initial payload and 12.4 of fuel. + +- Return the amount of fuel needed rounded to one decimal place. + +# --hints-- + +`launch_fuel(50)` should return `12.4`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(launch_fuel(50), 12.4)`) +}}) +``` + +`launch_fuel(500)` should return `124.8`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(launch_fuel(500), 124.8)`) +}}) +``` + +`launch_fuel(243)` should return `60.7`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(launch_fuel(243), 60.7)`) +}}) +``` + +`launch_fuel(11000)` should return `2749.8`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(launch_fuel(11000), 2749.8)`) +}}) +``` + +`launch_fuel(6214)` should return `1553.4`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(launch_fuel(6214), 1553.4)`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def launch_fuel(payload): + + return payload +``` + +# --solutions-- + +```py +def launch_fuel(payload): + total_mass = payload + additional_fuel = total_mass / 5 + total_fuel = additional_fuel + + while additional_fuel >= 1: + total_mass += additional_fuel + additional_fuel = (total_mass / 5) - total_fuel + total_fuel += additional_fuel + + return round(total_fuel, 1) +``` diff --git a/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e26.md b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e26.md new file mode 100644 index 00000000000..3b8a00dc787 --- /dev/null +++ b/curriculum/challenges/english/blocks/daily-coding-challenges-python/68c497f3aaefc9fd9f1b0e26.md @@ -0,0 +1,101 @@ +--- +id: 68c497f3aaefc9fd9f1b0e26 +title: "Challenge 62: Hex to Decimal" +challengeType: 29 +dashedName: challenge-62 +--- + +# --description-- + +Given a string representing a hexadecimal number (base 16), return its decimal (base 10) value as an integer. + +Hexadecimal is a number system that uses 16 digits: + +- `0-9` represent values `0` through `9`. +- `A-F` represent values `10` through `15`. + +Here's a partial conversion table: + +| Hexadecimal | Decimal | +|:-----------:|:-------:| +| 0 | 0 | +| 1 | 1 | +| ... | ... | +| 9 | 9 | +| A | 10 | +| ... | ... | +| F | 15 | +| 10 | 16 | +| ... | ... | +| 9F | 159 | +| A0 | 160 | +| ... | ... | +| FF | 255 | +| 100 | 256 | + +- The string will only contain characters `0–9` and `A–F`. + +# --hints-- + +`hex_to_decimal("A")` should return `10`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(hex_to_decimal("A"), 10)`) +}}) +``` + +`hex_to_decimal("15")` should return `21`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(hex_to_decimal("15"), 21)`) +}}) +``` + +`hex_to_decimal("2E")` should return `46`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(hex_to_decimal("2E"), 46)`) +}}) +``` + +`hex_to_decimal("FF")` should return `255`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(hex_to_decimal("FF"), 255)`) +}}) +``` + +`hex_to_decimal("A3F")` should return `2623`. + +```js +({test: () => { runPython(` +from unittest import TestCase +TestCase().assertEqual(hex_to_decimal("A3F"), 2623)`) +}}) +``` + +# --seed-- + +## --seed-contents-- + +```py +def hex_to_decimal(hex): + + return hex +``` + +# --solutions-- + +```py +def hex_to_decimal(hex): + + return int(hex, 16) +``` diff --git a/curriculum/structure/blocks/daily-coding-challenges-javascript.json b/curriculum/structure/blocks/daily-coding-challenges-javascript.json index a9e596d375b..9cf5213690c 100644 --- a/curriculum/structure/blocks/daily-coding-challenges-javascript.json +++ b/curriculum/structure/blocks/daily-coding-challenges-javascript.json @@ -222,6 +222,38 @@ { "id": "68b7cadffed0e75a517da677", "title": "Challenge 54: P@ssw0rd Str3ngth!" + }, + { + "id": "68c1a929005bf54d342aa8d2", + "title": "Challenge 55: Space Week Day 1: Stellar Classification" + }, + { + "id": "68c1a929005bf54d342aa8d3", + "title": "Challenge 56: Space Week Day 2: Exoplanet Search" + }, + { + "id": "68c1a929005bf54d342aa8d4", + "title": "Challenge 57: Space Week Day 3: Phone Home" + }, + { + "id": "68c1a929005bf54d342aa8d5", + "title": "Challenge 58: Space Week Day 4: Landing Spot" + }, + { + "id": "68c1a929005bf54d342aa8d6", + "title": "Challenge 59: Space Week Day 5: Goldilocks Zone" + }, + { + "id": "68c497f3aaefc9fd9f1b0e24", + "title": "Challenge 60: Space Week Day 6: Moon Phase" + }, + { + "id": "68c497f3aaefc9fd9f1b0e25", + "title": "Challenge 61: Space Week Day 7: Launch Fuel" + }, + { + "id": "68c497f3aaefc9fd9f1b0e26", + "title": "Challenge 62: Hex to Decimal" } ] } diff --git a/curriculum/structure/blocks/daily-coding-challenges-python.json b/curriculum/structure/blocks/daily-coding-challenges-python.json index 6a1ca8e0652..c8fa75592bb 100644 --- a/curriculum/structure/blocks/daily-coding-challenges-python.json +++ b/curriculum/structure/blocks/daily-coding-challenges-python.json @@ -221,6 +221,38 @@ { "id": "68b7cadffed0e75a517da677", "title": "Challenge 54: P@ssw0rd Str3ngth!" + }, + { + "id": "68c1a929005bf54d342aa8d2", + "title": "Challenge 55: Space Week Day 1: Stellar Classification" + }, + { + "id": "68c1a929005bf54d342aa8d3", + "title": "Challenge 56: Space Week Day 2: Exoplanet Search" + }, + { + "id": "68c1a929005bf54d342aa8d4", + "title": "Challenge 57: Space Week Day 3: Phone Home" + }, + { + "id": "68c1a929005bf54d342aa8d5", + "title": "Challenge 58: Space Week Day 4: Landing Spot" + }, + { + "id": "68c1a929005bf54d342aa8d6", + "title": "Challenge 59: Space Week Day 5: Goldilocks Zone" + }, + { + "id": "68c497f3aaefc9fd9f1b0e24", + "title": "Challenge 60: Space Week Day 6: Moon Phase" + }, + { + "id": "68c497f3aaefc9fd9f1b0e25", + "title": "Challenge 61: Space Week Day 7: Launch Fuel" + }, + { + "id": "68c497f3aaefc9fd9f1b0e26", + "title": "Challenge 62: Hex to Decimal" } ] } diff --git a/tools/daily-challenges/seed-daily-challenges.ts b/tools/daily-challenges/seed-daily-challenges.ts index 09ab0a292da..3a1585b6005 100644 --- a/tools/daily-challenges/seed-daily-challenges.ts +++ b/tools/daily-challenges/seed-daily-challenges.ts @@ -13,7 +13,7 @@ const { MONGOHQ_URL } = process.env; // Number challenges in the dev-playground blocks // Update this if the number of challenges changes -const EXPECTED_CHALLENGE_COUNT = 54; +const EXPECTED_CHALLENGE_COUNT = 62; // Date to set for the first challenge, second challenge will be one day later, etc... // **DO NOT CHANGE THIS AFTER RELEASE (if seeding production - okay for local dev)**