Guest User

yay

a guest
Apr 7th, 2016
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.47 KB | None | 0 0
  1. import random
  2. import math
  3. def boot():
  4.   print """         _____________ _____________
  5.        |             |             |
  6.        |             |             |
  7.        |             |             |
  8.        |             |             |
  9.        |             |             |
  10.        |_____________|_____________|
  11.        |             |             |
  12.        |             |             |
  13.        |             |             |
  14.        |             |             |
  15.        |             |             |
  16.        |_____________|_____________|
  17.        
  18.  
  19.  
  20.             Welcome to Windows.
  21.  
  22. Please wait while we check your peripherals..."""
  23.  
  24. def username():
  25.   uname = raw_input("Username:")
  26.   password = raw_input("Password:")
  27.   if uname == "stpetersprep" and password == "password":
  28.     print "Logging in..."
  29.   else:
  30.     hint = raw_input("Do you need a hint?")
  31.     if hint == "yes" or hint == "Yes":
  32.       print "'stpetersprep' is the username and 'password' is the password"
  33.       username()
  34.     elif hint == "no" or hint == "No":
  35.       tryagain = raw_input("Would you like to try again?")
  36.       if tryagain == "yes" or tryagain == "Yes":
  37.         username()
  38.       else:
  39.         restart2 = raw_input("Would you like to restart?")
  40.     elif restart2 == "Yes" or restart2 == "yes":
  41.       boot()
  42.       peripherals()
  43.     else:
  44.       print "Shutting down..."
  45.  
  46. boot()
  47.  
  48. print "\n", "=" *54
  49.  
  50. def peripherals():
  51.   mouse = random.randint(1, 11)
  52.   if mouse <= 7:
  53.     mouse = 1
  54.     print "\nMouse: %s" % "Connected"
  55.   else:
  56.     mouse = 2
  57.     print "\nMouse: %s" % "Disconnected"
  58.   keyboard = random.randint(1,11)
  59.   if keyboard <= 5:
  60.     keyboard = 1
  61.     print "\nKeyboard: %s" % "Connected"
  62.   else:
  63.     keyboard = 2
  64.     print "\nKeyboard: %s" % "Disconnected"
  65.   monitor = random.randint(1, 11)
  66.   if monitor <= 9:
  67.     monitor = 1
  68.     print "\nMonitor %s\n" % "Connected"
  69.   else:
  70.     monitor = 2
  71.     print "\nMonitor not connected.\n \nYou can't even see this right now.\n"
  72.    
  73.   if mouse == 1 and keyboard == 1 and monitor == 1:
  74.     print "Your peripherals are connected... Please enter your username and password"
  75.     username()
  76.   elif mouse == 2 or keyboard == 2 or monitor == 2:
  77.     print "Your peripherals are not connected, please restart."
  78.     restart = raw_input("Would you like to restart?")
  79.     if restart == "Yes" or restart == "yes":
  80.       print "\n" * 5
  81.       boot()
  82.       peripherals()
  83.     else:
  84.       print "Shutting down..."
  85.        
  86. peripherals()
Add Comment
Please, Sign In to add comment