Advertisement
BOF007

APEDS

Jul 19th, 2015
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.49 KB | None | 0 0
  1.  
  2.  
  3. import sys
  4. import time
  5.  
  6. admins = {'BOF007':'12345',}
  7.  
  8. print('Welcome to the Automated Personal Error Detection System, or APEDS for short')
  9. print('')
  10. name = input("What is the Name of the Person I'll be assisting today?: ")
  11. print()
  12.  
  13. #runs a [===   ] loading bar
  14. def progressbar(it, prefix = "", size = 60):
  15.     count = len(it)
  16.     def _show(_i):
  17.         x = int(size*_i/count)
  18.         sys.stdout.write("  %s[%s%s] %i/%i\r \n" % (prefix, "="*x, " "*(size-x), _i, count))
  19.         sys.stdout.flush()
  20.    
  21.     _show(0)
  22.     for i, item in enumerate(it):
  23.         yield item
  24.         _show(i+1)
  25.     print()
  26. time.sleep(1)
  27.  
  28.  
  29.  
  30.  
  31. for i in progressbar(range(5),name+ "'s APEDS BOOTING", 20):
  32.    time.sleep(0.2) # long computation
  33.  
  34. print("Booting Complete Welcome", name)
  35. print()
  36.  
  37. #-------------
  38.  
  39.  
  40.  
  41. #main menu interface
  42. def mainmenu():
  43.     print("""
  44.    What seams to be the problem today?
  45.    """
  46.     #[-1] - Admin interface
  47.     """
  48.    [1] - Internet
  49.    [2] - TV
  50.    [3] - Landline (HomePhone)
  51.    [4] - Sound Systems
  52.  
  53.  
  54.    """)
  55.  
  56.     action = input("Please Select a Number: ")
  57.  
  58.    
  59.     # admin menu otion
  60.     if action == '-1':
  61.         loginusr = input('Username: ')
  62.         loginpw =  input('Password: ')
  63.  
  64.        
  65.         #admin menu
  66.         def adminmenu():
  67.             print('Easteregg Unlocked!')    
  68.             print(
  69.     """
  70.    Welcome to the Admin Menu
  71.    """
  72.     """
  73.    [1] -
  74.    [2] -
  75.    [3] -
  76.    [4] -
  77.    """)
  78.             action = input("Please Select a Number: ")
  79.  
  80.             if action == '1':
  81.                 print('1')
  82.             elif action == '2':
  83.                 print('2')
  84.             elif action == '3':
  85.                 print('3')
  86.             elif action == '4':
  87.                 print('4')
  88.             else:
  89.                 print('\nNo valid choice has been selected please try again')
  90.                 time.sleep(3.5)
  91.                 adminmenu()
  92.             #end of admin menu
  93.  
  94.  
  95.                
  96.         #admin menu sign in
  97.         if loginusr in admins:
  98.             if admins[loginusr] == loginpw:
  99.                 print()
  100.                 print()
  101.                 print('Welcome, ',loginusr)
  102.                 while True:
  103.                     adminmenu()
  104.             else:
  105.                 print('Invalid Password')
  106.                 time.sleep(1.5)
  107.         else:
  108.             print('Invalid Username')
  109.             time.sleep(1.5)
  110.             #end of admin menu login
  111.  
  112.  
  113.  
  114.            
  115.     # [ 1 ] option ( internet )
  116.     elif action == '1':
  117.         def submenu1():
  118.             print(
  119.     """
  120.    What Problems are u having with the internet?
  121.    """
  122.     """
  123.    [1] - Internet is Slow / Not Working
  124.    [2] - There's no Wi-Fi / Can't connect to Wi-Fi44
  125.    [3] -
  126.    [4] - Forgot my Wifi Password !
  127.    """)
  128.         action = input("Please Select a Number: ")
  129.  
  130.         if action == '1':
  131.             print('1')
  132.         elif action == '2':
  133.             print('2')
  134.         elif action == '3':
  135.             print('3')
  136.         elif action == '4':
  137.             print('4')
  138.         else:
  139.             print('\nNo valid choice has been selected please try again')
  140.             time.sleep(3.5)
  141.             adminmenu()
  142.            
  143.     elif action == '2':
  144.         print('2')
  145.     elif action == '3':
  146.         print('3')
  147.     elif action == '4':
  148.         print('4')
  149.     else:
  150.         print('\nNo valid choice has been selected please try again')
  151.         time.sleep(3.5)
  152.         mainmenu()
  153.  
  154.  
  155. while True:
  156.     mainmenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement