Code issue condition

Please I need code that has two push button and two led, one control one, the condition is when one is on let the other one not come on when pressed until the other one goes off

Show us a good schematic of your proposed circuit.
Show us a good image of your ‘actual’ wiring.
Give links to components.


In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.

Use the </> icon from the ‘reply menu’ to attach the copied sketch.

Then start coding! No one here will do the work for You.
Start by trying the example codes in the IDE for buttons and LEDs.

every single day here ppl asking "two button and two led sketch". is this some kind of flash mob?

No, CompSci 101 lab

Well, we don't know:
Which Arduino you have,
what value of current limit resistors for the LEDs and which pins they are connected to and how they are connected,
what kind of buttons you have and how they are connected to which pins, so...

I hope not- more like 001 level.

When a family member of mine was first year undergrad (doing masters now) the faculty deliberately used a more obscure micro dev board which had no Arduino or any other forum to get help on, so the students actually had to do the work themselves.

Give 'em a TI 74xx TTL book and a wire wrap panel & have at it!