I made a basic randomized program on my Raspberry Pi, and it goes somewhat like this.
import random
print ("Welcome to the PC Expo's new game, PC Dispenser, what will you win?")
WinorLose = random.randint(1, 1000)
if WinorLose <100:
print ("You won a Nintendo Wii.")
elif WinorLose >200:
print ("You won a Sony PSP.")
elif WinorLose > 300:
print ("You won a Nintendo Wii U.")
elif WinorLose > 400:
print ("You won a Sony PS Vita.")
else:
print ("Not your lucky day, Try again.")
print ("Thank you for the visit.")
if you cannot tell what it does, it has a chance of giving you a virtual PSP, Wii U, and so on. But all it is doing is printing rather "You win a Sony PSP", or "Not your lucky day, Try again." What is wrong? Any fixes?