Trying to get soemone to input a Password (hello) as an input and then getting a loop to a second part of the program where he/she inputs his/her name and then gets a response accordingly.
Not sure why this is not working but maybe someone else does.
let me know how you fixed the issue so i can learn from my mistakes.
print "Program 3 Loops and If Conditions"
#prints the title
print ("Author: Benoit Labelle")
#prints the author's name
print ("ID: 3065521")
#prints the authors id number
loop= 1
choice= 0
def enter_password():
pwrd=raw_input("hello")
wpass=raw_input("Password: ")
return Password
def enter_name():
cher=input("Can I get your authograph")
madonna= input("Can I get your authograph")
ben=input("What a great name!! ")
benoit=input("What a great name!! ")
choice = int(raw_input("Password ").strip())
return
while loop==1:
print "Option 1: Enter your password"
print "Option 2: Exit"
choice = int(raw_input("Enter your option: ").strip())
if choice ==1:
pwrd= input("Password")
if input is hello:
print "Welcome to the second part of the program"
loop==2
elif input is not hello:
print "Password"
if choice== 2:
loop=0
print " Thank you come again"
while loop==2:
choice = int(raw_input("What is your name: ").strip())
if name== Benoit:
print "What a great name!!!"
elif name == Madonna:
print "Can I have your authograph?"
elif name == Cher:
print "May I have your authograph?"
elif name != Benoit or Cher or Madona:
print "what a nice name"