Advertisement
Guest User

OuterProgram v2 Comments

a guest
May 11th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 0.90 KB | None | 0 0
  1. x = int(raw_input('Enter User ID?\n'))   # x will be used as the main function parameter
  2.  
  3. def congrats():  # will return when used in main function
  4.   print('Congrats student of Prep, enter and head to class now!')
  5.  
  6. def electric_scanner(x):
  7.   import time
  8.   usernames = 912 or 821 or 632 or 109 or 835 or 324 or 465
  9.   PapaJRob = 7777777                         # /\ Used so that only one 3 digit number
  10.   if x == usernames:                         # will be compared
  11.     print('Door Opened')
  12.     congrats()
  13.   elif x == PapaJRob:               # it is the PapaJRob option
  14.     print('The door has completely vanished')
  15.   else:
  16.     print('Door remains closed')
  17.     time.sleep(.5)        # Delays code by .5 sec
  18.     print('Try again')
  19.     time.sleep(.5)        # Delays code by another .5 sec making total 1 sec
  20.     electric_scanner(x)    # Loops back if incorrect number inputted
  21.    
  22.  
  23. electric_scanner(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement