Login and get codingFor this challenge, you are going to have write a function to convert a base 10 integer into any base, as long as that base is no lower than 2 and no larger than 36.

Here’s a nice explanation of how it’s traditionally done: Base Conversion Method.

For example:

- 126 converted to base

2is1111110- 126 converted to base

4is1332- 126 converted to base

8is176- 126 converted to base

16is7EIf the base is out of that range, the function should raise a

`ValueError`

.The returned value should be a string. That’s it, happy coding!

Metrics »

35 out of 37 users completed this Bite.

Will you be Pythonista #36 to crack this Bite?

Resolution time: ~43 min. (avg. submissions of 5-240 min.)

Pythonistas rate this Bite 2.33 on a 1-10 difficulty scale.

» You can do it! 😌