Microsoft MakeCode

Help for a program (duty)

Hello, for a kind of project, my teacher wants me to do a program but I can’t do it at all (we are barely starting) Here’s what to do :
Carry out a program which will light a number of LEDs equal to the temperature divided by 2 one by one when you press A and turn them off when you press B.
Thank you in advance for your help.

Good luck!