Difficulty: ★ ★ ☆ ☆
Last month, I completed my series on Base 36, which uses digits 0 through 9 and A through Z to represent values. The use of these digits means that common words can represent values in base 36. In fact, your name is a base 36 value. But what is it?
Your challenge for this month’s Exercise is to find out!
Write a program that prompts the user for their name. The code must massage the input, converting the text into uppercase letters A through Z only.
You can pull functions from the examples presented in earlier Lessons, such as the b36_decimal() function, which is required to obtain the base 36 value of your name.
Here’s a sample run of my solution:
Enter your name: dan
Base 36 DAN in decimal is 17231
And a longer example:
Enter your name: Jeremiah
Base 36 JEREMIAH in decimal is 1521051222041
Obviously, there is an overflow issue with long names; my solution can’t fathom base 36 values longer than ten letters. Even so, this exercise stands as presented. Please try coding the solution on your own, before you check out my solution.