Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Connor Heaney & Vatche Kafafian
- #Vatche did the sports program and some other functions
- #Connor did bugfixing, editing, and some other functions
- # imports for functions later on (both)
- import string
- import random
- # tests for keybord and mouse (Connor)
- def test(a,b):
- while a<3:
- print "keyboard not conected"
- a=5
- test(random.randint(1,10),random.randint(1,10))
- while b<3:
- print "mouse not conected"
- b=5
- test(random.randint(1,10),random.randint(1,10))
- a=random.randint(1, 10)
- b=random.randint(1, 10)
- test(a,b)
- # simulates powering up the computer(Vatche)
- def powerup():
- choice = raw_input('')
- choice = (choice)
- if choice == "p":
- print ("Computer Powering On...")
- else:
- exit(0)
- print (30 * '-')
- print ("Welcome")
- print (30 * '-')
- powerup()
- # boot menue (Connor)
- def boot():
- print "-"*50
- print "1: boot from drive\n2: boot from disc"
- print "-"*50
- bop=raw_input()
- bop=int(bop)
- if bop>2:
- print "invalid boot option"
- boot()
- else:
- print ""
- boot()
- # simulates loging in (Vatche; edited by connor)
- def login():
- username = raw_input("Username:")
- username = (username)
- if username == "kafafianv": # vache's username
- password = raw_input("Password:")
- password = (password)
- elif username == "heaneyc": # connor's username
- password = raw_input("Password:")
- password = (password)
- else:
- username = raw_input("Invalid... Press Enter to Try Again:")
- login()
- username = (username)
- if password == "prep":
- print "Access Gained..."
- else:
- print "Invalid password... try again"
- login()
- login()
- # this program lets you see sprots scores, stats and other things for several leagues. it also inclueds the restart and log off functions
- # information and power off by vatche log off, reastart, %d, and edits by Connor
- def program():
- print ("Choose the number that cooresponds with your desired catagory...").upper()
- catagory = int(input("1. NBA \n 2. NHL \n 3. UFC \n 4. Log off \n 5. Restart \n 6. Power Off \n"))
- p=2000
- if catagory == 1:
- print ("Choose a catagory in the NBA...")
- nba = int(input(" 1. NBA News \n 2. NBA Stats \n 3. NBA History \n 4. back\n"))
- if nba == 1:
- print ("(All Headlines from NBA.com)")
- print ("Kings' Cousins suspended for 1 game for 16th technical \n Mar 31, 2016 11:01 PM ET")
- print ("76ers on brink of matching worse record in NBA history \n Mar 31, 2016 10:21 PM ET")
- print ("Cavs' James moves into 12th place on career scoring list \n Mar 31, 2016 9:52 PM ET")
- print ("Russell apologizes for taking video of teammate Young \n Mar 30, 2016 11:05 PG ET")
- program()
- elif nba == 2:
- print ("League Leader in PPG: Stephen Curry (30.0 PPG)")
- print ("League Leader in RPG: Andre Drummond (14.9 RPG)")
- print ("League Leader in APG: Rajon Rondo (11.7 APG)")
- print ("League Leader in SPG: Stephen Curry (2.2 SPG)")
- print ("League Leader in FG%: Deandre Jordan (70.2 FG%)")
- print ("League Leader in FT%: Jamal Crawford (91.6 FT%)")
- print ("League Leader in 3P%: JJ Redick (47.1 3P%)")
- program()
- elif nba == 3:
- print ("2015 Champions: Golden State Warriors")
- print ("2014 Champions: San Antonio Spurs")
- print ("2013 Champions: Miami Heat")
- print ("2012 Champions: Miami Heat")
- print ("2011 Champions: Dallas Mavericks")
- print ("2010 Champions: Los Angeles Lakers")
- print ("2009 Champions: Los Angeles Lakers")
- print ("2008 Champions: Boston Celtics")
- print ("2007 Champions: San Antonio Spurs")
- print ("2006 Champions: Miami Heat")
- print ("2005 Champions: San Antonio Spurs")
- print ("2004 Champions: Detroit Pistons")
- print ("2003 Champions: San Antonio Spurs")
- print ("2002 Champions: Los Angeles Lakers")
- print ("2001 Champions: Los Angeles Lakesr")
- print ("2000 Champions: Los Angeles Lakers")
- print ("1999 Champions: Chicago Bulls")
- print ("1998 Champions: Chicago Bulls")
- print ("1997 Champions: Chicago Bulls")
- program()
- elif nba == 4:
- program()
- elif catagory == 2:
- print ("Choose a catagory in the NHL...").upper()
- nhl = int(input("1. NHL News \n 2. NHL Stats \n 3. NHL History \n 4. back"))
- if nhl == 1:
- print ("(All headlines from NHL.com)")
- print ("Oilers' McDavid named Rookie of Month for March")
- print ("Kings shut out Flames, back in first in Pacific")
- print ("Third-period rally helps Hurricanes top Rangers")
- print ("Blackhawks' Keith to have phone hearing Friday")
- print ("NHL seeing merit in NCAA goaltenders")
- program()
- elif nhl == 2:
- print ("League Leader in Points: Patrick Kane (94 points)")
- print ("League Leader in Goals: Alex Ovechkin (44 goals)")
- print ("League Leader in Assists: Erik Karisson (63 assists)")
- print ("League Leader in Plus-Minus: Tyler Toffoli (+33 Plus-Minus)")
- print ("League Leader in GAA: Brian Elliott (1.92 GAA)")
- print ("League Leader in Save %: Brian Elliot (.935 Save %)")
- print ("League Leader in Shutouts: Corey Crawford (7 Shutouts)")
- program()
- elif nhl == 3:
- print ("%d Champions: Chicago Blackhawks") %(p+15)
- print ("%d Champions: Los Angeles Kings") %(p+14)
- print ("%d Champions: Chicago Blackhawks") %(p+13)
- print ("%d Champions: Los Angeles Kings") %(p+12)
- print ("%d Champions: Boston Bruins") %(p+11)
- print ("%d Champions Chicago Blackhawks") %(p+10)
- print ("%d Champions: Pittsburgh Penguins") %(p+9)
- print ("%d Champions: Detroit Red Wings") %(p+8)
- print ("%d Champions: Anaheim Ducks") %(p+7)
- print ("%d Champions: Carolina Hurricanes") %(p+6)
- print ("%d Champions: N/A") %(p+5)
- print ("%d Champions: Tampa Bay Lightining") %(p+4)
- print ("%d Champions: New Jersey Devils") %(p+3)
- print ("%d Champions: Detroit Red Wings") %(p+2)
- print ("%d Champions: Colorado Avalanche") %(p+1)
- print ("%d Champions: New Jersey Devils") %(p)
- print ("%d Champions: Dallas Stars") %(p-1)
- print ("%d Champions: Detroit Red Wings") %(p-2)
- print ("%d Champions: Detroit Red Wings") %(p-3)
- program()
- elif nhl == 4:
- program()
- elif catagory == 3:
- print ("Choose a catagory in the UFC...").upper()
- ufc = int(input("1. UFC News \n 2. UFC Stats \n 3. UFC Hall of Fame \n 4. back"))
- if ufc == 1:
- print ("All Headlines from UFC.com")
- print ("Diaz-McGreggor II to Headline UFC 200")
- print ("Aldo and Edgar to Battle for Interim Title at UFC 200")
- print ("UFC Nominated for Two Sports Emmy Awards")
- print ("Once rivals, Anthony Pettis and Cowboy Cerrone train together")
- program()
- elif ufc == 2:
- print ("#1 Pound-For-Pound Fighter: Jon 'Bones' Jones")
- print ("Flyweight Champion: Demetrious 'Mighty Mouse' Johnson")
- print ("Bantamweight Champion: Dominick 'The Dominator' Cruz")
- print ("Featherweight Champion: Conor 'The Notorious' McGregor")
- print ("Lightweight Champion: Rafael Dos Anjos")
- print ("Welterweight Champion: Robbie 'Ruthless' Lawler")
- print ("Middleweight Champion: Luke Rockhold")
- print ("Light Heaveyweight Champion: Daniel 'DC' Cormier")
- print ("Heavyweight Champion: Fabricio 'Vai Cavalo' Werdum")
- print ("Women's Strawweight Champion: Joanna Jedrzejczyk")
- print ("Women's Bantamweight Champion: Miesha 'Cupcake' Tate")
- program()
- elif ufc == 3:
- print ("Mark 'The Hammer' Coleman: 16-10-0")
- print ("Randy 'The Natural' Couture: 18-10-0")
- print ("Pat 'The Croation Sensation' Miletich 27-5-2")
- print ("Royce Gracie: 13-2-2")
- print ("Matt Hughes: 45-7-0")
- print ("Tito 'The People's Champ' Ortiz: 17-11-1")
- print ("Chuck 'The Iceman' Liddell: 21-8-0")
- print ("Forrest Griffin: 19-7-0")
- print ("Dan 'The Beast' Severn: 70-13-7")
- print ("Ken 'The World's Most Dangerous Man' Shamrock: 26-11-2")
- print ("Stephan 'The American Psycho' Bonnar: 17-8-0")
- program()
- elif ufc == 4:
- program()
- elif catagory == 4:
- print ("Logging off...")
- login()
- program()
- elif catagory == 5:
- boot()
- test(a,b)
- login()
- program()
- elif catagory == 6:
- exit (0)
- else:
- print ("Invalid Choice...")
- program()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement