Toggling a blinking LED

My project material includes one button and 2 LEDs. When button is pressed and released, LEDs should alternate like LED1 on for 1sec, off for 1sec LED2 on for 1sec, off for 1sec, and repeat that. But when the button is pressed and released again both should be off. I cant code it correctly, im exhausted, code or advice please

Sounds like a school project. And you want us to help you cheat?

I cant code it correctly,

Post your best shot, use the </> icon and post it between the tags that come up.

Say what the code actually does and what you would like it to do.

We can give you pointers as to what you are doing wrong but we will not do it for you.

You should change the title because blinking means turning on and off and to toggle means to turn on and off. Put together they make a noncense. It is like saying burning a burning log.