Calculator Text

Challenge Difficulty: Medium | Estimated completion time: ~20 minutes

At school, we used to play with our calculators and send each other secret messages. The trick was to enter a special number and turn the calculator upside-down.

Like saying hello, you’d type in the calculator 07734 and turn it upside down:

Calculator showing HELLO

Given a number, create a function that converts it into a word by turning the integer 180 degrees around.

Examples

turnCalc(707)
output = "LOL"
 
turnCalc(5508)
output = "BOSS"
 
turnCalc(3045)
output = "SHOE"
 
turnCalc(07734)
output = "HELLO"

Number to Letter Mapping

numberletter
1I
2Z
3E
4H
5S
6G
7L
8B
9-
0O

Notes

  • Convert to uppercase words.
  • Ignore dots.

Solution

Python
Output