Putting RFID card and keep the lamp running all the time

I am a grade 8 student. I want to write the following code when placing the RFID Card on the receiver tray. And then ordered the LED to be on all the time when the RFID card was removed. The LED must be off.
And when inserting the RFID Card (incorrect), the speaker will make a loud noise and the light won't turn

Can I get the sample code and explanations from all of your knowledgeable people?

thank you very much

I'm from Thailand.

you won't find anyone here to do your homework... The whole point of school is to learn... SO Get going, read stuff and propose some code (read forum's rules)

you can start small. learn how to turn on or off the LED. learn how to read the ID of card and test it against a known value

if you are stuck you'll find people to provide ideas as long as you've put in some efforts...