How to make a character who moves like a slinky?

I have a school duty to do a 2D platform game, with a character who moves like crazy:

Example of slinky movement

(Animated example of the mission linked above)

  1. At first, the character must grow with time

  2. When the player presses a button, the character begins to bend to the next platform

  3. Its height when you press the button determines whether it will reach the next platform.

  4. After that, he has to shrink to his original size, and he starts again.

How can I approach this?