int greenLedPin = 9;   
 int redLedPin = 10;   
int button1Pin = 2;    
int button2Pin = 3;   

void setup() {
  pinMode(greenLedPin, OUTPUT);   
  pinMode(redLedPin, OUTPUT);     
  pinMode(button1Pin, INPUT);     
  pinMode(button2Pin, INPUT);    
}

void loop() {

  if (digitalRead(button1Pin) == HIGH) {
    digitalWrite(greenLedPin, HIGH); 
  } else {
    digitalWrite(greenLedPin, LOW);  
  }


  if (digitalRead(button2Pin) == HIGH) {
    digitalWrite(redLedPin, HIGH);   
  } else {
    digitalWrite(redLedPin, LOW);     
  }
}