-4

So here is my coding for my questionnaire so far. On the 6th line how would I make it print invalid if the user enters a random set of characters that is not 1234?

 print ("Welcome, Please enter your Canadian Armed Forces Identification Number")
 answer = raw_input()
 if answer == ("1234"):
     print " Please identify yourself "
 elif answer == "":
     print " Invalid ID "
     print " 3 More attempts before termination of program "
 name= raw_input()

 if answer == ("Silva"):
     print " Welcome, Silva "
user247702
  • 22,915
  • 14
  • 108
  • 152

1 Answers1

0
if answer == ("1234"):
    print " Please identify yourself "
else:
    print " Invalid ID "
    print " 3 More attempts before termination of program " name= raw_input()
JakeSidSmith
  • 789
  • 5
  • 11