TASK 1

Binary to Denary

Inside a computer, everything is represented by binary, which we write as strings of 1s and 0s.

Binary strings represent numbers, if you don't know how binary works checkout the tutorials page for the introduction to binary numbers

Assuming now that you know how binary works, the first task here is to convert a binary string to a denary integer

You must implement the function:

def binary_to_denary(bits: str) -> int:

Some example outputs:

Good Luck!

Well done!

When you are ready, continue on to the next task.

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!