Haz un código led
def led(x): if x == 1: return "led" else: return "off" def main(): x = 1 while True: print(led(x)) x = x + 1 if __name__ == "__main__": main() A: You can use a dictionary to store the mapping between the number and the string. Then you can use the