Skip to content

Water Class - Hanh Solo submission#47

Open
seattlefurby17 wants to merge 3 commits into
Ada-C14:masterfrom
seattlefurby17:master
Open

Water Class - Hanh Solo submission#47
seattlefurby17 wants to merge 3 commits into
Ada-C14:masterfrom
seattlefurby17:master

Conversation

@seattlefurby17

Copy link
Copy Markdown

Binary and Decimal

Congratulations! You're submitting your assignment.

@CheezItMan CheezItMan left a comment

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.

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

Comment thread lib/binary_to_decimal.rb
Comment on lines +11 to +14
binary_array.each do |digit|
sum_of_digits += digit * (2**power_of_digit)
power_of_digit -= 1
end

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.

This is good, just fixing indentation.

Suggested change
binary_array.each do |digit|
sum_of_digits += digit * (2**power_of_digit)
power_of_digit -= 1
end
binary_array.each do |digit|
sum_of_digits += digit * (2**power_of_digit)
power_of_digit -= 1
end

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