I am trying to make a quest in python terminal but when i try to compare two code it says its wrong
import time
import random
def adventure():
key = random.randint(111,999)
delay = 1
print()
print("the code is", key)
time.sleep(delay)
uk = input("do you remember the code?")
if uk == key:
print("Good")
else:
print("wrong code")
Edit: so the solution was instead of
if uk == key:
do this
if int(uk) == key: