7 kyu

Mobile operator detector

529 of 1,223veitsi

Description:

When a warrior wants to talk with another one about peace or war he uses a smartphone. In one distinct country warriors who spent all time in training kata not always have enough money. So if they call some number they want to know which operator serves this number.

Write a function which accepts number and return name of operator or string "no info", if operator can't be defined. number always looks like 8yyyxxxxxxx, where yyy corresponds to operator.

Here is short list of operators:

  • 039 xxx xx xx - Golden Telecom
  • 050 xxx xx xx - MTS
  • 063 xxx xx xx - Life:)
  • 066 xxx xx xx - MTS
  • 067 xxx xx xx - Kyivstar
  • 068 xxx xx xx - Beeline
  • 093 xxx xx xx - Life:)
  • 095 xxx xx xx - MTS
  • 096 xxx xx xx - Kyivstar
  • 097 xxx xx xx - Kyivstar
  • 098 xxx xx xx - Kyivstar
  • 099 xxx xx xx - MTS
Logic
Strings
Regular Expressions
Fundamentals

More By Author:

Check out these other kata created by veitsi

Stats:

CreatedSep 16, 2015
PublishedSep 16, 2015
Warriors Trained1957
Total Skips112
Total Code Submissions3831
Total Times Completed1223
JavaScript Completions637
Ruby Completions98
Python Completions529
Total Stars27
% of votes with a positive feedback rating81% of 219
Total "Very Satisfied" Votes156
Total "Somewhat Satisfied" Votes44
Total "Not Satisfied" Votes19
Total Rank Assessments10
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • veitsi Avatar
  • joh_pot Avatar
  • GiacomoSorbi Avatar
  • FArekkusu Avatar
  • cliffstamp Avatar
  • Haksell Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad