6 kyu

Ka Ka Ka cypher - words only vol 1

326 of 1,106dcieslak

Description:

Introduction

Ka ka ka cypher is a cypher used by small children in some country. When a girl wants to pass something to the other girls and there are some boys nearby, she can use Ka cypher. So only the other girls are able to understand her.
She speaks using KA, ie.:
ka thi ka s ka bo ka y ka i ka s ka u ka gly what simply means this boy is ugly.

Task

Write a function that accepts a string word and returns encoded message using ka cypher.

Our rules:

  • The encoded word should start from ka.
  • The ka goes after vowel (a,e,i,o,u)
  • When there is multiple vowels together, the ka goes only after the last vowel
  • When the word is finished by a vowel, do not add the ka after

Input/Output

The word string consists of only lowercase and uppercase characters. There is only 1 word to convert - no white spaces.

Example

"a" => "kaa"
"ka" => "kaka"
"aa" => "kaaa"  
"Abbaa" => "kaAkabbaa"
"maintenance" => "kamaikantekanakance"
"Woodie" => "kaWookadie"
"Incomprehensibilities" => "kaIkancokamprekahekansikabikalikatiekas"

Remark

Ka cypher's country residents, please don't hate me for simplifying the way how we divide the words into "syllables" in the Kata. I don't want to make it too hard for other nations ;-P

Fundamentals

Stats:

CreatedJun 5, 2017
PublishedJun 5, 2017
Warriors Trained2046
Total Skips144
Total Code Submissions4019
Total Times Completed1106
JavaScript Completions472
C# Completions120
CoffeeScript Completions9
Ruby Completions66
C++ Completions169
Python Completions326
Crystal Completions7
Total Stars58
% of votes with a positive feedback rating94% of 253
Total "Very Satisfied" Votes229
Total "Somewhat Satisfied" Votes20
Total "Not Satisfied" Votes4
Total Rank Assessments11
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • dcieslak Avatar
  • GiacomoSorbi Avatar
  • smile67 Avatar
  • nekokat Avatar
  • Voile Avatar
  • hobovsky Avatar
  • ejini战神 Avatar
  • Just4FunCoder Avatar
Ad