Skip to content

Conversation

@ranuseh
Copy link

@ranuseh ranuseh commented Mar 5, 2019

Binary and Decimal

Congratulations! You're submitting your assignment.

def binary_to_decimal(binary_array)
raise NotImplementedError

array = Array.new(8) { rand(0..1) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

You shouldn't need lines 8 and 15. Run rake and make sure that all the tests pass.

array = Array.new(8) { rand(0..1) }

def binary_to_decimal(array)
reversed_array = array.reverse
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you think of a way to do this without calling .reverse?

@shrutivanw
Copy link
Collaborator

Good work!

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