Skip to content
← Back to Community
magic 8 ball--bored project
Profile icon
ThomasTooley

a simple project when your bored!

Voters
Profile icon
RomeroSchwarz
Profile icon
ThomasTooley
Comments
hotnewtop
Profile icon
RomeroSchwarz

Hey, this is pretty funny to use! If you're accepting ideas, try using a list to store the answers instead of all of the if statements. It would really condense the code and look something like this (remember, list IDs start at 0):

import random
answers = [ yes, no, hmm not sure, definitely, definitely not, probably, probably not, error 404]
print(answers[random.randint(0,7)])

Profile icon
AllAwesome497

Please add a description as to what the repl does instead of adding spam