The length of a spring without hanging a heavy object is 12cm, and the length of extension after hanging a heavy object is directly proportional to the mass of the suspended object; if a 1kg object is hung, the spring is extended by 2cm; the functional relationship between the total length of the spring y (unit: cm) and the mass x (unit: kg) of the suspended object is obtained

The length of a spring without hanging a heavy object is 12cm, and the length of extension after hanging a heavy object is directly proportional to the mass of the suspended object; if a 1kg object is hung, the spring is extended by 2cm; the functional relationship between the total length of the spring y (unit: cm) and the mass x (unit: kg) of the suspended object is obtained

∵ after hanging a 1kg object, the spring extends 2cm, ∵ after hanging an XKG object, the spring extends 2xcm, ∵ the total length of the spring y = 12 + 2x. That is to say, the functional relationship between the total length of the spring y (unit: cm) and the mass of the object x (unit: kg) is y = 12 + 2x