Yes, a line segment can have a fractional length. The measurement does not have to be equal to a whole number.