from codex import * from time import sleep dbacks_pos = ["pitcher", "catcher", "1st Base", "2nd Base", "3rd Base", "shortstop"] dbacks_players = ["Merrill Kelley", "Gabriel Moreno", "Christian Walker", "Ketel Marte", "Evan Longoria", "Geraldo Perdomo"] rangers_pos = ["cather", "3rd base", "1st base", "shortstop", "2nd base", "outfielder"] rangers_players = ["Mitch Garver", "Josh Jung", "Nathaniel Lowe", "Corey Seager", "Marcus Semian", "Adolis Garcia"] def intro(): display.clear() display.print("Welcome to the slideshow") display.print("") display.print("A = diamondbacks") display.print("B = rangers") display.print("D = quit") def ending(): display.clear() display.print("Thank you") display.print("The end") def slideshow(topic): if topic == 1: the_list1 = dbacks_pos the_list2 = dbacks_players team = "Diamondbacks" else: the_list1 = rangers_pos the_list2 = rangers_players team = "Rangers" for index in range(len(the_list1)): display.clear() display.print(team) display.print(the_list1[index]) display.print(the_list2[index]) sleep(2) display.clear() display.print("End of list") # MAIN PROGRAM intro() topic = 1 while True: if buttons.was_pressed(BTN_A): topic = 1 if buttons.was_pressed(BTN_B): topic = 2 if buttons.was_pressed(BTN_L): slideshow(topic) if buttons.was_pressed(BTN_D): break ending()