3
Through the bases
In this challenge, you will be taking a number through all the bases of the rainbow
Given an input, n
, you will output n
in every base from 9 to 2, and back up to 9. That's 9 8 7 6 5 4 3 2 3 4 5 6 7 8 9
.
Example:
>>> 16 17 20 22 24 31 100 121 10000 121 100 31 24 22 20 17
Rules:
- You input can be a string or a number.
- Your output may be separated by new lines, spaces, commas, or tabs.
- You may use built in functions.
- Shortest code wins!
Can the output be comma-separated? – Downgoat – 2015-07-23T23:21:08.310
@vihan1086 yes. – phase – 2015-07-23T23:21:29.500
I'm really late on this but can each line be surrounded by quotes? e.g.
"17"\n"20"
– Piccolo – 2015-08-05T05:05:15.503