mardi 25 août 2015

i dont understand why my "if" command don't work as it should

import random  
cde = random.random()  
print(cde)  
tst = input("Whats the code?\n")  
if tst == cde:  
    print("Welcome")  
else:  
    print("Imposter!!!")

when i run this code and after I've typed in the "cde" thing its keeps saying imposter but it should say welcome

Aucun commentaire:

Enregistrer un commentaire