USS Voyager: Hazard Protocol Delta (retired)
Description:
EMH's Log, Supplemental
"Apparently, someone deleted the astrometrics database and corrupted the sensors. Again. Lieutenant Paris claims it was 'space moths.' I don’t want to know. I’ve recalibrated the sensors to use the old Federation standard hazard codes instead of those ridiculous emojis. Typical Starfleet overdesign. It seems '🌌' was confusing the plasma relays. Well, the danger levels are accurate enough for now, even if the ship's sensors remain... overenthusiastic."
Mission Briefing
The USS Voyager's sensors are malfunctioning (again), and the ship is stuck at Blue Alert‡. As the Emergency Medical Hologram, the ship's captain has (unfairly) tasked you with recalibrating the danger assessment system. Calculate threat levels from corrupted sensor data before we encounter a nebula... or worse.
‡Blue Alert: Activated for spatial hazards, landings, and takeoffs. Yes, this is canon.
Your Task:
Calculate danger levels (0-100) from garbled sensor inputs containing hazard codes. Account for the fact that sometimes the sensors will call the function without providing any valid information (packet-loss due to corruption in the ship's gel packs), and extra whitespace where there should be none (due to subspace interference).
Input Format
A comma-separated string of hazard codes:
"NEB,COM,ION,PUL,BHO" // Nebula, Comet, Ion Storm, Pulsar, Black Hole
Hazard Values, complete list
Code | Hazard | Danger | Notes |
---|---|---|---|
NEB | Nebula | 10 | I'm immune to their effects. Apparently. |
COM | Comet | 20 | We found a Q in one of these... |
ION | Ion Storm | 30 | B'Elanna Torres has a score to settle with one. |
PUL | Pulsar | 40 | Great for boosting your signal! |
BHO | Black Hole | 50 | Never answering another distress call from one... |
Rules:
- Sensors should provide a comma-delimited list (but may not provide anything!).
- Whitespace around codes (e.g., " NEB " or "\tCOM\t") should be trimmed before validation.
- Sum all Valid Codes. Cap at 100.
- Invalid Codes (e.g.,
"SPACE_MOTH"
) are ignored. - Empty input → 0
EMH's Post-Script:
"I doubt this will blow up the ship. I’m a doctor, not a pyrotechnics expert! If this works, maybe I’ll ask the Captain to let me program the torpedo guidance system next. What could possibly go wrong? Now, if only we could get the gel packs to stop hallucinating Klingon opera..." Current repertoire: Act 3 of "Aktuh and Maylota" on loop.
🖖
Similar Kata:
Stats:
Created | Mar 29, 2025 |
Warriors Trained | 12 |
Total Skips | 0 |
Total Code Submissions | 34 |
Total Times Completed | 9 |
JavaScript Completions | 9 |
Total Stars | 0 |
% of votes with a positive feedback rating | 29% of 7 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 7 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |