I am not able to refer to an output of a random choice function using an array.
import random
dice = ["•", "• •", "• • •", "• • • •", "• • • • •", "• • • • • •"] #strings of dots
print(random.choice(dice))
if dice == dice([5]): #Does not work, not able to refer to the six dot string
print("You are lucky.")
elif dice:
print("You are not lucky.")
Aucun commentaire:
Enregistrer un commentaire