I am trying to make a dice game and I want to make it so it will detect if the number on the dice is odd or even. This is what I tried and it didn't work.
from random import randrange
import random
import time
Even = [2, 4, 6]
Odd = [1, 3, 5]
x = random.randint(1, 6)
print("Rolling Dice...")
print("Your number is...." + str(x))
if str(x) == Even:
print("It is an Even number!")
if str(x) == Odd:
print("It is an Odd number!")
I need to know how to do the if statments and to make it detect if it's even or odd.