TASK 2

Denary to Binary

Now that you have successfully done the conversion in one direction, it's time to try the opposite!

Your task here is to convert a denary integer to a binary string

You must implement the function:

def denary_to_binary(val: int) -> str:

Note: Your output should have no leading 0s, unless the value is 0.


Some example outputs:

Good Luck!

Well done!

You have completed all of the tasks.

Return home or take a look at the tutorials

Something isn't quite right...

Close this message and have another go!

GUIDE

This guide is intended to help with syntax. See the prelude section for pre-defined functions and variables. See the tutorials page for tutorials on how to write code.



Can't find what you're looking for?

Check the tutorials page for more!

PRELUDE

The prelude is all the pre-defined functions and variables available to use. See the tutorials page for tutorials on how to write code.



Can't find what you're looking for?

Check the tutorials page for more!