• CheckiO Weekly #2 ― Braille Translator Review

Hi, CiO friends.

Today I would like delve into the Braille system. Braille is a tactile writing system used by the blind and the visually impaired. It is traditionally written with embossed paper.

In the "English to Braille Translator" Checkio mission, you are challenged to write a translator to convert a chunk of english text into Braille. For this we will use the 6-dot based Braille alphabet.

Your script which you will write for this mission would be useful when parsing braille text and formatting it for printing, or it could be used to translate existing text into braille for others. Let's take a look at how some CiO players did that.

First off, we cannot skip veky with his Visual solution. Try to comprehend this code without assistance before you even look at the comments where you'll find veky explains his magic. Just as a hint: "The secret is R. :-)".

R = " a,b*k*l*cif*msp*e-h*o!r*djg*ntq$***_u?v*****x****.**z******#yw*"

Honestly, it really does look like magic, but when you get into it, you like this kind of thing.

If the previous solution was too magical for you, then take a look at vinc's solution. Vinc uses some predefined data and then weaves the results in. This solution can be a simpler method for some of our python newbies.

And if you like function decomposition, camelCase and formatted comments, then jcg's solution, "First", will be right up your alley.

You can learn how to write code like you'd see in a science article in Blastus' "First" solution. All the fragments are placed on shelves and inside are many, many 'for' loops.

I think these solutions'll give you some nice weekend reading. Don't forget to upvote interesting solutions, the authors will be pleased!

Feel free ask any questions in the comments if you find something is not clear in a solution, or ask the advisers if you have problems with some mission. The CheckiO community is always friendly and will gladly help you.

Become Awesome

  • No Ads
  • No Limits
  • More Content

Welcome to CheckiO - games for coders where you can improve your codings skills.

The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.

Join the Game