Skip to content

Conversation

@kelsk
Copy link

@kelsk kelsk commented Aug 31, 2019

Binary and Decimal

Congratulations! You're submitting your assignment.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, you hit the learning goals here. Well done!


def binary_to_decimal(binary_array)
raise NotImplementedError
exponent_array = [2**7, 2**6, 2**5, 2**4, 2**3, 2**2, 2**1, 2**0]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but you've hardcoded for specific powers of 2. Can you think of a way to make this more flexible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants