I'm attempting to create a simple diced-base game where the user chooses a number, and if the program rolls it they win. The problem is that even when I win, the program says, "Oh no, you lose!" and I can't understand why. Help please!
chosennumber = ("The dice rolled the number")
user_text = "Choose a number between 1-6"
print (user_text)
number = input('Enter a number: ')
import random
mylist = [1,2,3,4,5,6]
randomnum = random.choice(mylist)
print (chosennumber, randomnum)
if (number == randomnum):
print ("You win")
else:
print ("Oh no, you lose!")