Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 251 Bytes

bin_to_decimal.md

File metadata and controls

11 lines (9 loc) · 251 Bytes

Description

Complete the function which converts a binary number (given as a string) to a decimal number.

My Solution

def bin_to_dec(str)
  str.to_i(2)
end