from codex import * import random from time import sleep answers_a = [ "1989", "Lover", "Red Taylor's Version", "Fearless Taylor's Version", "Midnights", "Folklore", "Evermore" ] answers_b = [ "Cruel Summer", "Anti-Hero", "Blank Space", "Style", "I Can See You", "I Forgot That You Existed", "The Man", "Wonderland" ] display.print("Favorite Taylor Albums") display.print("press A") display.print("Favorite Taylor Songs") display.print("press B") while True: # Pick a random color from COLOR_LIST index = random.randrange( len(COLOR_LIST) ) color = COLOR_LIST[index] pixels.set(0, random.choice(COLOR_LIST)) pixels.set(1, random.choice(COLOR_LIST)) pixels.set(2, random.choice(COLOR_LIST)) pixels.set(3, random.choice(COLOR_LIST)) if buttons.was_pressed(BTN_A): display.print(random.choice(answers_a)) audio.mp3('sounds/power') sleep(0.1) if buttons.was_pressed(BTN_B): display.print(random.choice(answers_b)) audio.mp3('sounds/okay') sleep(0.1)