Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import string
- import math
- import random
- import time
- # this is the boot up sequence for the computer
- def bootup():#The boot up function was made by Chris
- print "-" * 56
- print " Welcome!"
- print " Starting up Computer!"
- waiting = " waiting..."
- print " "
- print waiting
- time.sleep(0.5)
- print waiting
- time.sleep(0.5)
- print waiting
- time.sleep(0.5)
- print " "
- print " Keyboard Found!"
- time.sleep(1)
- print " Mouse Found!"
- time.sleep(1)
- print " Hard drive Found!"
- time.sleep(1)
- print " Monitor Found!"
- time.sleep(1)
- print " GPU Found!"
- time.sleep(1)
- print " CPU Found!"
- time.sleep(1)
- print " "
- print " Starting Login Screen!"
- bootup()
- # this is the username and password setup for the computer
- def userpassword():
- print "-" * 56
- print "Hello!"
- print " "
- print "Please insert username:"
- username = raw_input()
- password = raw_input("Please insert password:(Hint: What year is it?)")
- if password == "2016":
- print "Continuing login process..."
- if password != "2016":
- print "Sorry, but that is incorrect! System shutting down! Please reboot computer!"
- exit(0)
- userpassword()
- time.sleep(1)
- def programs():
- time.sleep(1)
- print " Welcome!"
- time.sleep(1)
- print " Here are a list of programs for you to run:"
- print " 1. Google Chrome"
- print " 2. Happy Leify"
- print " 3. Mozilla Firefox"
- print " 4. System Check"
- print " 5. Log Off"
- print " 6. Shut Down Computer"
- prg = int(raw_input("Please input the number of the program you want to run: "))
- if prg == 1:
- print "Opening Google Chrome..."
- time.sleep(1)
- print "Oops! No WiFi. Sorry, but Saint Peter's WiFi is terrible. Can't open."
- time.sleep(1)
- programs()
- elif prg == 2:
- print "-" * 30
- print " H A P P Y L E I F Y "
- print "-" * 30
- print " "
- print " 1. Play Game"
- print " 2. View Credits"
- print " 3. Smoke W33d Evrydae"
- print " 4. MLG"
- print "-" * 30
- print " "
- number = raw_input("Input a number: ")
- number = int(number)
- if number == 1:
- print "Welcome Leif Ericson. Oh, you don't remember? You are the great son of the Red Ericson. You're supposed to be on an adventure, right?\nWell, anywho, you're walking on a trail and come up at a fork in the road. Oh, and there is a fork in the road. You can either turn left or right."
- direction = raw_input("Which way will you go?")
- if direction == "left":
- print "Okay, you take the left path. You come up on a cliff. There is a ladder going up to the top of a cliff. You also notice a cave with a sign stating 'Rainbows and Unicorns Inside!' So there are your choices: either a ladder or a cave."
- direction2 = raw_input("Which way will you go again? (Type ladder or cave)")
- if direction2 == "ladder":
- print "You start climbing up the ladder. When you get to the top, you spot a slide going down back the path. You take the slide down and get back onto the path. As you walk down the path, you manage to find a beach with a bunch of mermaids. Congratz you win!"
- time.sleep(1)
- print "Sending you back to the main menu..."
- time.sleep(1)
- programs()
- elif direction2 == "cave":
- print "Wow! You are really gullible! Did you actually think there were unicorns and rainbows?! Wow... Anywho, you walk in the cave of a pack of lions and get eaten alive. The End. Being gullible loses every game. Please try the game over."
- time.sleep(1)
- print "Sending you back to the main menu..."
- time.sleep(1)
- programs()
- elif direction == "right":
- print "Way to go! You walk straight into a sand pit. For a fierce viking, you're pretty dumb. Please try the game over."
- time.sleep(1)
- print "Sending you back to the main menu..."
- time.sleep(1)
- programs()
- elif number == 2:
- print "Game was made by James Robbins and Nick Demetriades. (And was trash.)"
- time.sleep(1)
- print "Sending you back to the main menu..."
- time.sleep(1)
- programs()
- elif number == 3:
- print "Snoop Dogg: 'Smoke Weed everyday'"
- time.sleep(1)
- print "Sending you back to the main menu..."
- time.sleep(1)
- programs()
- elif number == 4:
- print "DUN DUNDUNDUNDUN DUN"
- time.sleep(1)
- print "Sending you back to the main menu..."
- time.sleep(1)
- programs()
- else:
- print "You suck."
- time.sleep(1)
- print "Sending you back to the main menu..."
- time.sleep(1)
- programs()
- elif prg == 3:
- print "Launching Mozilla Firefox"
- time.sleep(1)
- print "Failure to start Mozilla Firefox. Use a better browser."
- programs()
- elif prg == 4:
- def systemcheck():
- print " "
- print " Welcome to System Check!"
- print " Currently, your CPU only 6% of its potential."
- print " And your disk is only running at 37%."
- print " Would like to close any programs?"
- print " 1. Google Chrome"
- print " 2. Happy Leify"
- print " 3. Mozilla Firefox"
- print " If you don't want to just type no."
- systemcheckr = raw_input()
- if systemcheckr == "1":
- print "Closing up Google Chrome..."
- print "Thank you!"
- programs()
- elif systemcheckr == "2":
- print "Closing up Happy Leify..."
- print "Thank you!"
- programs()
- elif systemcheckr == "3":
- print "Closing up Mozilla Firefox..."
- print "Thank you!"
- programs()
- elif systemcheckr == "No" or "no":
- print "Okay, thank you!"
- programs()
- systemcheck()
- elif prg == 5:
- print "Logging off..."
- time.sleep(1)
- userpassword()
- programs()
- elif prg == 6:
- time.sleep(1)
- print "Shutting down computer..."
- time.sleep(1)
- print "Powering off in:"
- count = 0
- while (count < 6):
- print count
- time.sleep(1)
- count = count + 1
- print "Goodnight!"
- exit(0)
- programs()
- #This is our code for the Quarterly. What this program does, it runs a simple
- #computer system, using only 6 programs, two of them acting as nothing. For the start up, we
- #used a function called bootup that just stated that the computer was starting and
- #had found all the hardware necessary for the computer.
- #time.sleep was a code that James had found delays the program for a couple of seconds before running. . After the bootup, we used a function named userpassword specified for the
- #username and password. We made the username to be anything, but the password had to be 2016,
- #because if not the code would go through an exit(0) and you would have to restart.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement