Advertisement
Guest User

Untitled

a guest
Apr 7th, 2016
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.42 KB | None | 0 0
  1. # Connor Heaney & Vatche Kafafian
  2.  
  3. #Vatche did the sports program and some other functions
  4. #Connor did bugfixing, editing, and some other functions
  5.  
  6. # imports for functions later on (both)
  7. import string
  8. import random
  9.  
  10. # tests for keybord and mouse (Connor)
  11. def test(a,b):
  12. while a<3:
  13. print "keyboard not conected"
  14. a=5
  15. test(random.randint(1,10),random.randint(1,10))
  16. while b<3:
  17. print "mouse not conected"
  18. b=5
  19. test(random.randint(1,10),random.randint(1,10))
  20.  
  21. a=random.randint(1, 10)
  22. b=random.randint(1, 10)
  23. test(a,b)
  24.  
  25. # simulates powering up the computer(Vatche)
  26. def powerup():
  27. choice = raw_input('')
  28. choice = (choice)
  29. if choice == "p":
  30. print ("Computer Powering On...")
  31. else:
  32. exit(0)
  33.  
  34. print (30 * '-')
  35. print ("Welcome")
  36. print (30 * '-')
  37. powerup()
  38.  
  39. # boot menue (Connor)
  40. def boot():
  41. print "-"*50
  42. print "1: boot from drive\n2: boot from disc"
  43. print "-"*50
  44. bop=raw_input()
  45. bop=int(bop)
  46. if bop>2:
  47. print "invalid boot option"
  48. boot()
  49. else:
  50. print ""
  51. boot()
  52.  
  53. # simulates loging in (Vatche; edited by connor)
  54. def login():
  55. username = raw_input("Username:")
  56. username = (username)
  57. if username == "kafafianv": # vache's username
  58. password = raw_input("Password:")
  59. password = (password)
  60. elif username == "heaneyc": # connor's username
  61. password = raw_input("Password:")
  62. password = (password)
  63. else:
  64. username = raw_input("Invalid... Press Enter to Try Again:")
  65. login()
  66. username = (username)
  67. if password == "prep":
  68. print "Access Gained..."
  69. else:
  70. print "Invalid password... try again"
  71. login()
  72. login()
  73.  
  74. # this program lets you see sprots scores, stats and other things for several leagues. it also inclueds the restart and log off functions
  75. # information and power off by vatche log off, reastart, %d, and edits by Connor
  76. def program():
  77. print ("Choose the number that cooresponds with your desired catagory...").upper()
  78. catagory = int(input("1. NBA \n 2. NHL \n 3. UFC \n 4. Log off \n 5. Restart \n 6. Power Off \n"))
  79. p=2000
  80. if catagory == 1:
  81. print ("Choose a catagory in the NBA...")
  82. nba = int(input(" 1. NBA News \n 2. NBA Stats \n 3. NBA History \n 4. back\n"))
  83. if nba == 1:
  84. print ("(All Headlines from NBA.com)")
  85. print ("Kings' Cousins suspended for 1 game for 16th technical \n Mar 31, 2016 11:01 PM ET")
  86. print ("76ers on brink of matching worse record in NBA history \n Mar 31, 2016 10:21 PM ET")
  87. print ("Cavs' James moves into 12th place on career scoring list \n Mar 31, 2016 9:52 PM ET")
  88. print ("Russell apologizes for taking video of teammate Young \n Mar 30, 2016 11:05 PG ET")
  89. program()
  90. elif nba == 2:
  91. print ("League Leader in PPG: Stephen Curry (30.0 PPG)")
  92. print ("League Leader in RPG: Andre Drummond (14.9 RPG)")
  93. print ("League Leader in APG: Rajon Rondo (11.7 APG)")
  94. print ("League Leader in SPG: Stephen Curry (2.2 SPG)")
  95. print ("League Leader in FG%: Deandre Jordan (70.2 FG%)")
  96. print ("League Leader in FT%: Jamal Crawford (91.6 FT%)")
  97. print ("League Leader in 3P%: JJ Redick (47.1 3P%)")
  98. program()
  99. elif nba == 3:
  100. print ("2015 Champions: Golden State Warriors")
  101. print ("2014 Champions: San Antonio Spurs")
  102. print ("2013 Champions: Miami Heat")
  103. print ("2012 Champions: Miami Heat")
  104. print ("2011 Champions: Dallas Mavericks")
  105. print ("2010 Champions: Los Angeles Lakers")
  106. print ("2009 Champions: Los Angeles Lakers")
  107. print ("2008 Champions: Boston Celtics")
  108. print ("2007 Champions: San Antonio Spurs")
  109. print ("2006 Champions: Miami Heat")
  110. print ("2005 Champions: San Antonio Spurs")
  111. print ("2004 Champions: Detroit Pistons")
  112. print ("2003 Champions: San Antonio Spurs")
  113. print ("2002 Champions: Los Angeles Lakers")
  114. print ("2001 Champions: Los Angeles Lakesr")
  115. print ("2000 Champions: Los Angeles Lakers")
  116. print ("1999 Champions: Chicago Bulls")
  117. print ("1998 Champions: Chicago Bulls")
  118. print ("1997 Champions: Chicago Bulls")
  119. program()
  120. elif nba == 4:
  121. program()
  122. elif catagory == 2:
  123. print ("Choose a catagory in the NHL...").upper()
  124. nhl = int(input("1. NHL News \n 2. NHL Stats \n 3. NHL History \n 4. back"))
  125. if nhl == 1:
  126. print ("(All headlines from NHL.com)")
  127. print ("Oilers' McDavid named Rookie of Month for March")
  128. print ("Kings shut out Flames, back in first in Pacific")
  129. print ("Third-period rally helps Hurricanes top Rangers")
  130. print ("Blackhawks' Keith to have phone hearing Friday")
  131. print ("NHL seeing merit in NCAA goaltenders")
  132. program()
  133. elif nhl == 2:
  134. print ("League Leader in Points: Patrick Kane (94 points)")
  135. print ("League Leader in Goals: Alex Ovechkin (44 goals)")
  136. print ("League Leader in Assists: Erik Karisson (63 assists)")
  137. print ("League Leader in Plus-Minus: Tyler Toffoli (+33 Plus-Minus)")
  138. print ("League Leader in GAA: Brian Elliott (1.92 GAA)")
  139. print ("League Leader in Save %: Brian Elliot (.935 Save %)")
  140. print ("League Leader in Shutouts: Corey Crawford (7 Shutouts)")
  141. program()
  142. elif nhl == 3:
  143. print ("%d Champions: Chicago Blackhawks") %(p+15)
  144. print ("%d Champions: Los Angeles Kings") %(p+14)
  145. print ("%d Champions: Chicago Blackhawks") %(p+13)
  146. print ("%d Champions: Los Angeles Kings") %(p+12)
  147. print ("%d Champions: Boston Bruins") %(p+11)
  148. print ("%d Champions Chicago Blackhawks") %(p+10)
  149. print ("%d Champions: Pittsburgh Penguins") %(p+9)
  150. print ("%d Champions: Detroit Red Wings") %(p+8)
  151. print ("%d Champions: Anaheim Ducks") %(p+7)
  152. print ("%d Champions: Carolina Hurricanes") %(p+6)
  153. print ("%d Champions: N/A") %(p+5)
  154. print ("%d Champions: Tampa Bay Lightining") %(p+4)
  155. print ("%d Champions: New Jersey Devils") %(p+3)
  156. print ("%d Champions: Detroit Red Wings") %(p+2)
  157. print ("%d Champions: Colorado Avalanche") %(p+1)
  158. print ("%d Champions: New Jersey Devils") %(p)
  159. print ("%d Champions: Dallas Stars") %(p-1)
  160. print ("%d Champions: Detroit Red Wings") %(p-2)
  161. print ("%d Champions: Detroit Red Wings") %(p-3)
  162. program()
  163. elif nhl == 4:
  164. program()
  165. elif catagory == 3:
  166. print ("Choose a catagory in the UFC...").upper()
  167. ufc = int(input("1. UFC News \n 2. UFC Stats \n 3. UFC Hall of Fame \n 4. back"))
  168. if ufc == 1:
  169. print ("All Headlines from UFC.com")
  170. print ("Diaz-McGreggor II to Headline UFC 200")
  171. print ("Aldo and Edgar to Battle for Interim Title at UFC 200")
  172. print ("UFC Nominated for Two Sports Emmy Awards")
  173. print ("Once rivals, Anthony Pettis and Cowboy Cerrone train together")
  174. program()
  175. elif ufc == 2:
  176. print ("#1 Pound-For-Pound Fighter: Jon 'Bones' Jones")
  177. print ("Flyweight Champion: Demetrious 'Mighty Mouse' Johnson")
  178. print ("Bantamweight Champion: Dominick 'The Dominator' Cruz")
  179. print ("Featherweight Champion: Conor 'The Notorious' McGregor")
  180. print ("Lightweight Champion: Rafael Dos Anjos")
  181. print ("Welterweight Champion: Robbie 'Ruthless' Lawler")
  182. print ("Middleweight Champion: Luke Rockhold")
  183. print ("Light Heaveyweight Champion: Daniel 'DC' Cormier")
  184. print ("Heavyweight Champion: Fabricio 'Vai Cavalo' Werdum")
  185. print ("Women's Strawweight Champion: Joanna Jedrzejczyk")
  186. print ("Women's Bantamweight Champion: Miesha 'Cupcake' Tate")
  187. program()
  188. elif ufc == 3:
  189. print ("Mark 'The Hammer' Coleman: 16-10-0")
  190. print ("Randy 'The Natural' Couture: 18-10-0")
  191. print ("Pat 'The Croation Sensation' Miletich 27-5-2")
  192. print ("Royce Gracie: 13-2-2")
  193. print ("Matt Hughes: 45-7-0")
  194. print ("Tito 'The People's Champ' Ortiz: 17-11-1")
  195. print ("Chuck 'The Iceman' Liddell: 21-8-0")
  196. print ("Forrest Griffin: 19-7-0")
  197. print ("Dan 'The Beast' Severn: 70-13-7")
  198. print ("Ken 'The World's Most Dangerous Man' Shamrock: 26-11-2")
  199. print ("Stephan 'The American Psycho' Bonnar: 17-8-0")
  200. program()
  201. elif ufc == 4:
  202. program()
  203. elif catagory == 4:
  204. print ("Logging off...")
  205. login()
  206. program()
  207. elif catagory == 5:
  208. boot()
  209. test(a,b)
  210. login()
  211. program()
  212. elif catagory == 6:
  213. exit (0)
  214. else:
  215. print ("Invalid Choice...")
  216. program()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement