Retired
base16 number translator (retired)
Description:
Take a base10 number (0 - 255), and translate it to base16 5 How to translate numbers to base16: Divide the number by 16, do not go into decimals. Write down the remainder — this is one of your digits in base 16. Take the result from the division and divide it by 16 again. Write down the remainder. Keep repeating step 2 until the result of your division is less than 16. The last number is also part of your answer. Your answer should also be in reverse order of the numbers you get.
Translation Table:
Base-10 | Base-16
---------+--------
0 | 0
1 | 1
2 | 2
3 | 3
4 | 4
5 | 5
6 | 6
7 | 7
8 | 8
9 | 9
10 | A
11 | B
12 | C
13 | D
14 | E
15 | F
The function should return your value as a string, as there can be both numbers and letters.
TEST
Similar Kata:
Stats:
Created | Nov 25, 2024 |
Warriors Trained | 13 |
Total Skips | 0 |
Total Code Submissions | 42 |
Total Times Completed | 10 |
Python Completions | 10 |
Total Stars | 0 |
% of votes with a positive feedback rating | 8% of 6 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 6 |
Average Assessed Rank | 8 kyu |
Highest Assessed Rank | 8 kyu |
Lowest Assessed Rank | 8 kyu |