The input is not very clear that decimals is a must


#1

example,

1 : 2 ratio should be expressed as 1/2 = 0.50
1 : 4 ratio should be expressed as 1/4 = 0.25