logically this makes sense but does not work.
dice = 0
while True:
dice = int(input("enter dice: "))
if (dice != 4 or dice != 6 or dice != 8 or dice != 10 or dice != 12 or dice != 20):
print("invalid")
elif (dice == 4 or dice == 6 or dice == 8 or dice == 10 or dice == 12 or dice == 20):
print("valid")
break
print("Accepted dice")
I keep getting the invalid print statement. Want to have it as a loop until one of the correct die is selected.
ifis flawed, it will always evaluate as true. Takedice != 4 or dice != 6, it can never be false, the first part will only be false ifdice == 4but that makes the second part true