Skip to content

Sockets - Rosalyn#47

Open
ranuseh wants to merge 1 commit into
Ada-C11:masterfrom
ranuseh:master
Open

Sockets - Rosalyn#47
ranuseh wants to merge 1 commit into
Ada-C11:masterfrom
ranuseh:master

Conversation

@ranuseh

@ranuseh ranuseh commented Mar 5, 2019

Copy link
Copy Markdown

Binary and Decimal

Congratulations! You're submitting your assignment.

Comment thread lib/binary_to_decimal.rb
def binary_to_decimal(binary_array)
raise NotImplementedError

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

Copy link
Copy Markdown
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.

Comment thread lib/binary_to_decimal.rb
array = Array.new(8) { rand(0..1) }

def binary_to_decimal(array)
reversed_array = array.reverse

Copy link
Copy Markdown
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
Copy Markdown
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