Below I wrote code for creating a duplicator, for ex- If the parameter in the array is [2.4, 5.5, 7.8, 175.5], then the return value should be [2.4, 5.5, 7.8, 175.5, 2.4, 5.