about | help | code help+videos | done | prefs |
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) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy