print ("This program is to maker\n")
print ("t a red LED turn Of for the wrong guessing\n")
print("It a blue LED turn Of for the correct guessingin")
print ("Remarks: No limit on puessing traals\n\n")
from machine import Pin
from time import sleep
led_red = Pin(14, Pin.OUT) #Connect the LED to GPIO 14
led_blue = Pin(12, Pin.OUT) #connect the LED to GPIO 14
target = 33
while True: #forever loop
#obtain input from the user:
value = int(input("Enter an interger between 1 and 100: "))
if value > target:
print("WRONG!", value, "is high/too high")
for i in range(3):
led_red.on()
sleep(0.2)
led_blue.off()
sleep(0.2)
elif int(value) < target:
print("WRONG!", value, "is low/too low")
for i in range(3):
led_red.on()
sleep(0.2)
led_blue.off()
sleep(0.2)
else:
print("Perfect! Kudos")
led_blue.on()
led_red.off()
break