Every time I put in a number, it only prints the first input everytime instead of it being random. This is the code I used:
import random
import sys
answer = True
while answer:
question = input("Roll the di to get your fortune: ")
answers = random.randint(1,6)
if question == "":
sys.exit()
elif answer == 1:
print("You will get a new friend. ")
elif answer == 2:
print("You will go to disneyland. ")
elif answer == 3:
print("You will receive kindess.. ")
elif answer == 4:
print("Your will get a dog. ")
elif answer == 5:
print("You will suffer. ")
elif answer == 6:
print("You will have bad luck. ")
roll()
I really need help, I cant seem to figure out what I am doing wrong.
Aucun commentaire:
Enregistrer un commentaire