Help someone with making max value of 2 PUSH buttons.

Hello, I got task in University : scheme I made which composes of 2 push buttons and 1 led.

TASK: make scheme ( which I made correctly) I HAVE ATTACHED PHOTO BELOW OF SCHEME] and using " for" function you press 1 button and led is getting brighter until it reach 255 value.
if you press 2 button same led is getting darker until 0 value which means led is off.

I HAVE PROBLEM WITH THAT PUSH BUTTONS PRINTS VALUE ONLY 0 AND 1 AND HOW TO MAKE VALUE BOTH PUSH BUTTONS FROM 0 TO 255?

AND ALSO IF I PUSH 1 BUTTON IT PRINT 0 BUT I NEED 1 ( Reverse values)

SO THESE THINGS I CAN’T SOLVE MYSELF, THAT’S WHY I HERE TO ASKED FOR YOUR HELP.

CODE OFFCOURSE:

int ledPin = 8;


void setup()
{
 pinMode(3, INPUT);
 pinMode(2, INPUT);
 pinMode(8, OUTPUT);
  Serial.begin(9600);
}

void loop()
{
int mygtukas_1 = digitalRead(2);
int mygtukas_2 = digitalRead(3);
  Serial.println(mygtukas_1);
  Serial.println(mygtukas_2);
    for (int i = 8; i < 1; i++){
      analogWrite(8, HIGH);
      i++;
  }
}

I have tried to write myself but I am lack of skills of programming.

(deleted)

The state change detection example in the IDE (File, Examples, Digital) might shed some light on a possible solution. You may need to debounce the switches as well.