+ 5
Callum Sewart , at the beginning of the code you import the random module. then in line 9 the code is: ... fruit = ["APPLE", "BANANA", "PEACH", "ORANGE"] random = fruit ... so we overwrite the random module with the list *fruit* later we try to use the random module to generate a number. this will fail. words_index = random.randint(1, word_count)
20th Dec 2022, 8:04 PM
Lothar
Lothar - avatar