''' Mission 8 -- Answer Bot ''' from codex import * import random from time import sleep answers = ["The odds are yes", "It is not in the stars", "Go for the gold!", "Today is your day", "Stay home and read", "Have an adventure"] while True: color = COLOR_LIST(random.randrange(len(COLOR_LIST))) color = random.choice(COLOR_LIST) pixels.set(0, color) color = random.choice(COLOR_LIST) pixels.set(1, color) color = random.choice(COLOR_LIST) pixels.set(2, color) color = random.choice(COLOR_LIST) pixels.set(3, color) if buttons.was_pressed(BTN_A): display.clear() x = random.choice(answers) display.print(x) sleep(2) if buttons.was_pressed(BTN_B): break display.fill(BLACK)