Division in Ruby
The division operator in Ruby returns an integer if both operands are integers. This is different from other programming languages, such as Python, where the division operator returns a float.
9 / 5 #=> 1
By adding a decimal point to one of the operands, the division operator will return a float.
9.0 / 5 #=> 1.8
9 / 5.0 #=> 1.8