Loop Question

rusi rustompmody at gmail.com
Mon Jun 24 10:03:36 EDT 2013


On Monday, June 24, 2013 5:42:51 PM UTC+5:30, christ... at gmail.com 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 Successful"
> else:
>      print "Please try again"


Good!

Now take Steven's suggestion "loop with a break"
and bung your code into Steven's loop.
[Hint: You have to add a break somewhere!]

Or at least try!



More information about the Python-list mailing list