import time
time.sleep(0.1) # Wait for USB to become ready
from machine import Pin
from time import sleep
led = Pin(25, Pin.OUT)
led.on()
sleep(2)
led.off()
print ("Do you want to turn on the LED")
print ("'yes' - on")
print ("'no' - off")
While True:
anser = input()
if anser == 'yes':
led.on()
else :
led.off()