Re: Loop Question

2013-06-25 Thread Dave Angel
On 06/24/2013 08:20 AM, Lutz Horn wrote: Hi, Am 24.06.2013 14:12 schrieb [email protected]: username=raw_input("Please enter your username: ") password=raw_input("Please enter your password: ") if username == "john doe" and password == "fopwpo": print "Login Successful" else: pr

Re: Loop Question

2013-06-25 Thread Lutz Horn
Hi, Am 24.06.2013 14:12 schrieb [email protected]: username=raw_input("Please enter your username: ") password=raw_input("Please enter your password: ") if username == "john doe" and password == "fopwpo": print "Login Successful" else: print "Please try again" while not usernam

Re: Loop Question

2013-06-24 Thread Dave Angel
On 06/24/2013 03:00 PM, John Gordon wrote: In =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= writes: while True: username = raw_input("Please enter your username: ") password = raw_input("Please enter your password: ") if username == "john doe" and password == "fopwpo":

Re: Loop Question

2013-06-24 Thread John Gordon
In =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= writes: > > while True: > > username = raw_input("Please enter your username: ") > > password = raw_input("Please enter your password: ") > > > > if username == "john doe" and password == "fopwpo": > > print "Login Suc

Re: Loop Question

2013-06-24 Thread Chris “Kwpolska” Warrick
On Mon, Jun 24, 2013 at 8:42 PM, John Gordon wrote: > In > [email protected] writes: > >> On Sunday, June 23, 2013 6:18:35 PM UTC-5, [email protected] wrote: >> > How do I bring users back to beginning of user/password question once they >> > >> > fail it? thx > >> Can't seem to get this

Re: Loop Question

2013-06-24 Thread John Gordon
In [email protected] writes: > On Sunday, June 23, 2013 6:18:35 PM UTC-5, [email protected] wrote: > > How do I bring users back to beginning of user/password question once they > > > > fail it? thx > Can't seem to get this to cooperate...where does the while statement belong? while T

Re: Loop Question

2013-06-24 Thread christhecomic
On Sunday, June 23, 2013 6:18:35 PM UTC-5, [email protected] wrote: > How do I bring users back to beginning of user/password question once they > > fail it? thx Can't seem to get this to cooperate...where does the while statement belong? -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop Question

2013-06-24 Thread rusi
On Monday, June 24, 2013 5:42:51 PM UTC+5:30, [email protected] wrote: > Here is my code...I'm using 2.7.5 > > > username=raw_input("Please enter your username: ") > password=raw_input("Please enter your password: ") > if username == "john doe" and password == "fopwpo": > print "Login Succ

Re: Loop Question

2013-06-24 Thread christhecomic
Here is my code...I'm using 2.7.5 username=raw_input("Please enter your username: ") password=raw_input("Please enter your password: ") if username == "john doe" and password == "fopwpo": print "Login Successful" else: print "Please try again" -- http://mail.python.org/mailman/listinfo/

Re: Loop Question

2013-06-23 Thread christhecomic
I'm using 2.7 -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop Question

2013-06-23 Thread Steven D'Aprano
On Sun, 23 Jun 2013 16:18:35 -0700, christhecomic wrote: > How do I bring users back to beginning of user/password question once > they fail it? thx Write a loop. If they don't fail (i.e. they get the password correct), then break out of the loop. -- Steven -- http://mail.python.org/mailman/

Re: Loop Question

2013-06-23 Thread rurpy
On 06/23/2013 05:18 PM, [email protected] wrote: > How do I bring users back to beginning of user/password question once they > fail it? thx This is not a very good question. There is no context so we cannot tell if you are talking about a command line program that prompts for a username