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,613 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.
 
1 - 4 of 4 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top