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

 

ntod


Write a function that takes a string representation of a number, and an integer base of that number. Return the decimal value of the number in base 10. e.g. '1111',2 is '1111' in binary, which you must then convert to a decimal.


ntod('111111111111', 2) → 4095
ntod('333333', 4) → 4095
ntod('7777', 8) → 4095

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

def ntod(v,n):

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

Copyright Nick Parlante 2017 - privacy