id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

rmueller@lasacs.com > base2base
prev  |  next  |  chance

Given a string that consists of a number, the base of that number, as well as a new base, return a string of the number in the new base. Each base is an integer from 2 to 16. The uppercase letters A to F are used to represent a "digit" between 10 and 15 for bases greater than 10.


base2base('2F', 16, 10) → '47'
base2base('27', 10, 3) → '1000'
base2base('102', 3, 12) → 'B'

...Save, Compile, Run (ctrl-enter)

def base2base(num,baseFrom,baseTo):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 300

Copyright Nick Parlante 2017 - privacy