Draft

Alien Invasion?

Description:

So yet again aliens are in near earth orbit. Instead of using their standard annihilation protocol, they are flashing their big spaceship headlights towards earth. You, with your phD in saving the earth, have identified this as morse code! It's up to you to decode these messages and save planet earth once again, or not.

INPUT will be a string in morse code:

e.g.

'. . .   _   . _   . _ .   _       _ . _ .   _ _ _   . . _   _ .   _   . .   _ .   _ _ .       _   _ _ _   . . . _ _'

the encoding is only from alphabets and numbers.

OUPUT should be a string made of alphabets and numbers:

e.g. 'start counting to 3'

Inter[national|galactic] Morse Code:

  1. The length of a dot is one unit.
  2. A dash is three units.
  3. The space between parts of the same letter is one unit.
  4. The space between letters is three units.
  5. The space between words is seven units.
  a  = . _  
  b  = _ . . .  
  c  = _ . _ .  
  d  = _ . .  
  e  = .  
  f  = . . _ .  
  g  = _ _ .  
  h  = . . . .  
  i  = . .  
  j  = . _ _ _  
  k  = _ . _  
  l  = . _ . .  
  m  = _ _  
  n  = _ .  
  o  = _ _ _  
  p  = . _ _ .  
  q  = _ _ . _  
  r  = . _ .  
  s  = . . .  
  t  = _  
  u  = . . _  
  v  = . . . _  
  w  = . _ _  
  x  = _ . . _  
  y  = _ . _ _  
  z  = _ _ . .  
  1 = . _ _ _ _  
  2 = . . _ _ _  
  3 = . . . _ _  
  4 = . . . . _  
  5 = . . . . .  
  6 = _ . . . .  
  7 = _ _ . . .  
  8 = _ _ _ . .  
  9 = _ _ _ _ .  
  0 = _ _ _ _ _ 
  

Similar Kata:

More By Author:

Check out these other kata created by Thoreact

Stats:

CreatedJul 23, 2017
Warriors Trained12
Total Skips0
Total Code Submissions13
Total Times Completed7
JavaScript Completions7
Total Stars1
% of votes with a positive feedback rating13% of 4
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes3
Total Rank Assessments5
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • Thoreact Avatar
Ad