# to IntstrNumber = "42"number = strNumber.to_i# to FloatstrPi = "3.14"piFloat = strPi.to_f# the second methodstrHalf = "0,5"half = strHalf.sub(",", ".").to_fputs "number is #{number}"puts "piFloat is #{piFloat}"puts "half is #{half}"