Skip to content

Conversation

@indiakato
Copy link

Binary and Decimal

Congratulations! You're submitting your assignment.

Copy link
Collaborator

@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.

Not bad India, you hit the basic learning goal here. Take a look at my comment about how to convert it into a loop.

#test_array = [1, 0, 1, 1, 0, 0, 1, 1]
# the decimal number of test array should be 179

def binary_to_decimal(array)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This works, but it doesn't scale. Can you see how to make this into a loop?

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