Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Ray and tylers code
- import time #Reseached online: http://stackoverflow.com/questions/510348/how-can-i-make-a-time-delay-in-python #It is an import for time
- import math #Imports all the math code
- import random # imports all the random code.
- def schedual(): #Train Schedule Ray and Tyler
- print "="*50
- print (" \t\t T R A I N S")
- print ("="*50)
- print(' \t Train schedule to get to school')
- print ( "="*50)
- start = raw_input('\tType prep to continue: ')
- print "="*50
- if start == 'prep':
- print "What train line do you want to take Montclair booton or Hudson Bergen Lightrail",
- print "="*50 #Code used in a pass assignment #Code from pass assigenment
- def randomnumb(): #tyler
- rannumber = random.choice([1,2,3,4,5,6])
- while rannumber <= 0:
- ranumber = rannumber + 1
- print 'you rounded a the number %s' % rannumber,
- print '',
- print '',
- main_menu1()
- def train(): #This is the code for the train schedule Ray
- train = raw_input()
- if train == 'Montclair':
- print ('Do you want to get to hoboken early, on time or late')
- montclair = raw_input()
- if montclair == 'early':
- print 'Trains to hoboken are \n\ndepart 6:28am--7:00am arrives\ndepart 6:40am--7:17am arrives',
- main_menu1()
- elif montclair == 'on time':
- print 'Trains to hoboken are \n\ndepart 7:08am--7:40am arrives',
- main_menu1()
- elif montclair == 'late' :
- print 'Your going to get jub if you dont pick the first three 3 so any other trains dont matter.'
- main_menu1()
- if train == 'hudson bergen lightrail':
- print ('Do you want to get to school early, on time or late')
- hudson = raw_input()
- if hudson == 'early':
- print 'The trains to Marin are \n\ndepart 6:06am--6:22am arrives\ndepart 6:18m--6:34am arrives\ndepart 6:36am--6:52am arrives\ndepart 6:47am--7:03am arrives',
- main_menu1()
- elif hudson == 'on time':
- print 'Trains to Marin are \n\ndepart 7:16am--7:32am arrives\ndepart 7:45am--8:01am arrives',
- main_menu1()
- elif hudson == 'late':
- print ' Your going to get jug if you dont pick the first 6 so any other trains dont matter.'
- main_menu1()
- else:
- print 'you didnt select a choice',
- main_menu1()#code from passed assignment. #Code from pass assignment
- def systemdi(): #tyler
- loading()
- def calculator(): #Calculator Ray and Tyler
- print '1. addiction' #all the options for the calculator.
- print '2. subtraction'
- print '3. multiplication'
- print '4. division'
- print '5. return to main menu'
- calculatorRI = raw_input('choose one')
- if calculatorRI == '1':
- print add(),
- calculator()
- elif calculatorRI == '2':
- print subtract(),
- calculator()
- elif calculatorRI == '3':
- print Multiply(),
- calculator()
- elif calculatorRI == '4':
- print divide(),
- calculator()
- elif calculatorRI == '5':
- print 30*'-',
- main_menu1()
- else:
- print 'not a option'
- def loading(): #learned from jason davidoff #ray
- print 'Loading'
- time.sleep(1),
- print 30*'-'
- time.sleep(1)
- print 'mouse connection:'
- time.sleep(1)
- print random.choice(['connected','disconnected','error'])
- time.sleep(1)
- print '\n'
- time.sleep(1)
- print 'internet connection:'
- time.sleep(1)
- print random.choice(['connected','disconnected','error'])
- time.sleep(1)
- print '\n'
- time.sleep(1)
- print 'keyboard connection :'
- time.sleep(1)
- print random.choice(['connected','disconnected','error'])
- time.sleep(1)
- print '\n'
- time.sleep(1) #learned from Jason who showed me how to use the time code.
- print 'Moniter:'
- time.sleep(1)
- print random.choice(['connected','disconnected','error'])
- time.sleep(1)
- print '\n'
- time.sleep(1)
- main_menu1()
- def add(): #addiction function
- print "Enter the numbers"
- A=int(raw_input("Enter 1:"))# the first varialbe
- B=int(raw_input("ENter 2:"))# second variable.
- return A + B #mades is add
- def subtract(): #subtraction function Ray
- print "Enter the numbers"
- A=int(raw_input("Enter 1:"))
- B=int(raw_input("Enter 2:"))
- return A - B
- def Multiply(): #multiply ray
- print "Enter the numbers"
- A=int(raw_input("Enter 1:"))
- B=int(raw_input("Enter 2:"))
- return A * B
- def divide(): #divide ray
- print "Enter the numbers"
- A=int(raw_input("Enter 1:"))
- B=int(raw_input("Enter 2:"))
- return A / B
- def main_menu1(): #Main menu ray
- print (50 * '-')
- print '1. calculator'
- print '2. train schedule'
- print '3. system diagnostic'
- print '4. reboot'
- print '5. shutdown'
- print '6. logoff'
- print '7. roll dice'
- main_menu = raw_input('what do you want to use')
- if main_menu == '1':
- calculator()
- if main_menu == '2':
- schedual(),
- train()
- elif main_menu == '3':
- systemdi()
- elif main_menu == '4':
- reboot()
- elif main_menu == '5':
- shut_down()
- elif main_menu == '6':
- login()
- elif main_menu == '7':
- randomnumb()
- def shut_down(): #The function to shutdown the computer -Tyler
- print 'shutting down'
- time.sleep(1)
- print '...'
- time.sleep(1)
- print '..'
- time.sleep(1)
- print '.'
- exit()
- def admin(): #
- adminoveride = raw_input()
- if adminoveride == 'overide123':
- print 'Welcome %s' %user,
- main_menu1()
- else:
- print 'password fail'
- def login():
- print 'logged out'
- time.sleep(1)
- bye = ' ' """ ######::::#######:::#######::########:
- ##... ##::##.... ##:##.... ##:##.... ##
- ##:::..:::##:::: ##:##:::: ##:##:::: ##
- ##::'####:##:::: ##:##:::: ##:##:::: ##
- ##::: ##::##:::: ##:##:::: ##:##:::: ##
- ##::: ##::##:::: ##:##:::: ##:##:::: ##
- ######:::.#######::.#######::########:"""
- bye2 =' '"""########::'##:::'##:'########:
- ##.... ##:. ##:'##:: ##.....::
- ##:::: ##::. ####::: ##:::::::
- ########::::. ##:::: ######:::
- ##.... ##:::: ##:::: ##...::::
- ##:::: ##:::: ##:::: ##:::::::
- ########::::: ##:::: ########:"""
- print bye
- print ' '
- print bye2
- rebootseq2()
- def passwordT(): #Tyler
- print 'please type in password',
- password = raw_input()
- print (30 * '-')
- if password == 'password1234':
- print 'welcome %s'%user,
- main_menu1()
- elif password == "anything":
- print 'work'
- else:
- print 'type admin override',
- admin()
- def passwordR(): #Ray
- print 'please type in password',
- password = raw_input()
- print (30 * '-')
- if password == 'password1234':
- print 'welcome %s' %user, #The modules makes it so that the input would be the welcome
- main_menu1()
- elif password == "anything":
- print 'work'
- else:
- print 'type admin override',
- admin()
- def reboot():# RAy
- print 30*'-'
- print 'Restarting computer please wait a few seconds'
- time.sleep(1)
- print '............'
- time.sleep(1)
- print '............'
- time.sleep(1)
- print '............'
- time.sleep(1)
- print '............'
- rebootseq2()
- def rebootseq2(): # This is to make the reboot start up again -Ray
- print (30 * '-')
- print (" L O G I N")
- print (30 * '-')
- print 'pick a user'
- print '\n admin Ray Jasinski \n Guest Tyler Kinney' #This is definitly made by ray
- print (30 *'-')
- user = raw_input()
- if user == 'tyler': #Made by tyler
- passwordT()
- elif user == 'Tyler Kinney':
- passwordT()
- elif user == 'Tyler':
- passwordT()
- if user == 'ray': #made by ray
- passwordR()
- elif user == 'Ray':
- passwordR()
- elif user == 'Ray Jasinski':
- passwordR()
- else:
- print 'not a option'
- print ''
- print (30 * '-')# The start of the program.
- print (" L O G I N")
- print (30 * '-')
- print 'pick a user'
- print '\n admin Ray Jasinski \n Guest Tyler Kinney' #This is definitly made by ray
- print (30 *'-')
- user = raw_input()
- if user == 'tyler': #Made by tyler
- passwordT()
- elif user == 'Tyler Kinney':
- passwordT()
- elif user == 'Tyler':
- passwordT()
- elif user == 'Kinney':
- passwordT()
- if user == 'ray': #made by ray
- passwordR()
- elif user == 'Ray':
- passwordR()
- elif user == 'Ray Jasinski':
- passwordR()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement