Coding Challenge :: Helping Aliens!!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 13

Coding Challenge :: Helping Aliens!!!

A group of Aliens on Jupiter found 12 sheets containing an encrypted message to them from humans, encoded entirely in the Decimal (Base 10) Number system. Unfortunately, these Aliens can only read and understand the Octal (Base 8) and the Hexadecimal (Base 16). One of them was sent to you to help write a program that can decrypt this message! Your code should take a maximum of 5 input per time and output the results in a tabular form: Decimal Octal Hexadecimal Will you help the Aliens???

7th Aug 2017, 1:07 PM
Femyk
Femyk - avatar
5 Answers
7th Aug 2017, 3:29 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 4
I mean each input can be 1 or 2 or 3... 5 decimal numbers which are then converted into octal and hexadecimal... The results are display in a table of three columns: 1. The user's input(s) 2. The octal equivalence of each input. 3. The hexadecimal equivalence of each input. ^-^
7th Aug 2017, 1:17 PM
Femyk
Femyk - avatar
+ 4
Really? Anyone knows there's no life in Jupiter.. ;) Here's my attempt in Python.. https://code.sololearn.com/clSOMhzo48iw/#py
7th Aug 2017, 10:44 PM
noobcøder
noobcøder - avatar
+ 3
Here we go. Tried to squeeze it into 10 lines so I skipped exception handling; hope that's not a major issue though https://code.sololearn.com/c7A1ZYjiesE0/?ref=app
7th Aug 2017, 2:09 PM
Garikai
Garikai - avatar
+ 2
You mean each decimal input will be 5 digits long? or, take 5 inputs in one batch?
7th Aug 2017, 1:10 PM
Salekin
Salekin - avatar