
Implement a function that reads a string encoding an integer in a given base and returns its decimal value.
parse_int_base(" +ff", 16)Expected result
255For your own tracking. Tests grade your code.
parse_int_base("-1010stop", 2)Expected result
-10parse_int_base("cafe", 16)Expected result
51966Expected files
parse_int_base.cAllowed functions
None. Write every helper yourself.

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement a function that reads a string encoding an integer in a given base and returns its decimal value.
parse_int_base(" +ff", 16)Expected result
255For your own tracking. Tests grade your code.
parse_int_base("-1010stop", 2)Expected result
-10parse_int_base("cafe", 16)Expected result
51966Expected files
parse_int_base.cAllowed functions
None. Write every helper yourself.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.