6 kyu

Guess and convert

129 of 130Cptnprice

Description:

In this kata, you have to define a function named func that will take a list as input.

You must try and guess the pattern how we get the output number and return list - [output number,binary representation,octal representation,hexadecimal representation], but you must convert that specific number without built-in : bin,oct and hex functions.

Examples :

func([12,13,6,3,6,45,123]) returns - [29,'11101','35','1d']

func([1,9,23,43,65,31,63,99]) returns - [41,'101001','51','29']

func([2,4,6,8,10,12,14,16,18,19]) returns - [10,'1010','12','a']
Puzzles

Stats:

CreatedSep 6, 2017
PublishedSep 7, 2017
Warriors Trained280
Total Skips4
Total Code Submissions318
Total Times Completed130
Python Completions129
Total Stars10
% of votes with a positive feedback rating84% of 60
Total "Very Satisfied" Votes46
Total "Somewhat Satisfied" Votes9
Total "Not Satisfied" Votes5
Total Rank Assessments10
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • Cptnprice Avatar
  • aweleshetu Avatar
  • saudiGuy Avatar
Ad