Tokxatron

From Programpedia

(Difference between revisions)
(Adding source-code of a program I made.)
(Posting new version.)
 
Line 1: Line 1:
-
<pre>name = raw_input("What is your name? ")  
+
<pre>
-
print "Hello", name, "- please enter a valid password; typing clue will display the password clue."
+
name = raw_input("What is your name? ")  
 +
print "Hello", name, "- welcome to Tokxatron."
 +
 
 +
setpassword = raw_input("Please set a password:")
 +
print "Your password is", setpassword, "do not forget it."
password = raw_input("Enter password: ")  
password = raw_input("Enter password: ")  
-
print "Verification of password", password, "taking place - please wait."
 
-
 
-
if password == '116':
 
-
    print 'Password correct, welcome to Tokxatron'
 
-
if password == 'clue':
 
-
    print 'Duration of the Hundred Years War - in years'
 
-
 
-
 
-
    password = raw_input("Enter password: ")
 
-
    print "Verification of password", password, "taking place - please wait."
 
-
    if password == '116':
+
if name == name:
-
        print 'Password correct, welcome to Tokxatron'
+
if password == setpassword:
 +
    print 'Password correct, welcome to Tokxatron.'
-
    else:
+
else:
-
        print 'Password incorrect, access denied'  
+
    print 'Password incorrect, access denied.'
else:
else:
-
        print 'Password incorrect, access denied'  
+
    print 'Password incorrect, access denied.'
-
if password == '116':
+
</pre>
-
    print 'Now that you remember the password, be careful and never forget it again!'</pre>
+

Current revision as of 22:03, 20 May 2008

name = raw_input("What is your name? ") 
print "Hello", name, "- welcome to Tokxatron."

setpassword = raw_input("Please set a password:") 
print "Your password is", setpassword, "do not forget it."

password = raw_input("Enter password: ") 

if name == name:
 if password == setpassword:
    print 'Password correct, welcome to Tokxatron.'

 else:
    print 'Password incorrect, access denied.'

else:
    print 'Password incorrect, access denied.'

Personal tools