Potentiometer connected to LED

For an assignment, I’ve to connect my led with a button and potentiometer, but I’m completely lost on how to do it.

I need the LED to turn on when the button is pressed.
When the LED is on, it needs to turn off again when the potentiometer turns to the left, it has to stay on when the potentiometer turns to the right or when it stays in the same position.

I need to do this for the other button as well, but instead, it needs to turn off when the potentiometer turns to the right.

Why don’t you show us your code, and we can maybe help you with it?

Maybe change the topic title?

And take a look here

caseystijlaart:
I need to do this for the other button as well, but instead, it needs to turn off ...

What other button, and how does a button turn off?
We may answer specific questions for you, but you should not expect a complete assignment to be programmed for you.