An exercise done semester 1