Overclock.net banner

1 - 4 of 4 Posts

·
Registered
Joined
·
78 Posts
Discussion Starter #1
I am making a small program that needs a password, so the way i am doing the password is:

password = raw_input("Enter your password: ")
if password == "secret":
print "Access Granted"
if password != "secret":
???

How do i make it exit the program?
 

·
Power Squid
Joined
·
9,609 Posts
Are your codeing this in VisualBasic? If so all you need to put is "end".

Code:
Code:
application.exit
 

·
Premium Member
Joined
·
3,590 Posts
Well I don't know python, but I know in Perl and Ruby (two lanuages similar to python) you can type:
exit;
or
0;

to exit the current block.
 

·
Registered
Joined
·
78 Posts
Discussion Starter #4
Quote:


Originally Posted by t4ct1c47
View Post

Are your codeing this in VisualBasic? If so all you need to put is "end".

Code:
Code:
application.exit
]

 
1 - 4 of 4 Posts
Top