[Tutor] how come this doesnt work
walter weston
hacker0100 at hotmail.com
Sat Jan 15 03:22:58 CET 2011
I generate a random number(supposedly a password, in my case its just a long floating point lol),I want the user to reinput that number and I want to print a string if the number entered is correct. so if m==num(num is the number generated and m is the variable which stores the input ) then I want to print 'you entered correctly, proceed'.
here is my code..
import random
for x in range(0,1):
num = random.random()
print (num)
m=input('input pass:')
if m==num:
print('you entered correctly, proceed')
It's very noobish dont give me complex replys, and dont be to rude or laugh at me, as I am a beginner In the programming domain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110114/0d424f7d/attachment.html>
More information about the Tutor
mailing list