Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Kevin Vieira and Vieri Arriaga
- import math
- from random import choice # Random is for the transaction code. Kevin
- from string import ascii_uppercase # ascii_uppercase is for the transaction code for the letters. Kevin
- from string import digits # digits pulls out random numbers for the generator for the transaction code. Kevin
- print "-"*30
- print "\x1b[1m Hello, welcome to SkyNet!"
- print "\033[0m-"*30
- money = 1000
- parts = ['Razer Keyboard', 'Razer Mouse', 'ASUS Monitor', 'ASUS Motherboard', 'Intel CPU', 'ASUS Graphic Card', 'Cisco System Fan', 'Termaltake Computer Case', 'Seagate Hard Drive', 'Windows 10 Operating System']
- admin_username = 'futhead'
- admin_password = 'cake'
- def purchase():
- global money
- print "What would you like to buy?"
- print parts
- stuff=raw_input()
- while money > 130:
- if stuff=="Razer Keyboard":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-130
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 20:
- if stuff=="Razer Mouse":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-20
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 400:
- if stuff=="ASUS Monitor":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-400
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 200:
- if stuff=="ASUS Motherboard":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-200
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 250:
- if stuff=="Intel CPU":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-250
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 400:
- if stuff=="ASUS Graphics Card":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-400
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 160:
- if stuff=="CISCO System Fan":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-160
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 150:
- if stuff=="Thermaltake Computer Case":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-150
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 100:
- if stuff=="Seagate Hard Drive":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-100
- print "You have %s dollars left." %money
- print " "
- again()
- while money > 100:
- if stuff=="Windows 10 Operating system":
- print "Purchase Successful!"
- print (''.join(choice(ascii_uppercase + digits) for i in range(9)))
- money=money-100
- print "You have %s dollars left." %money
- print " "
- again()
- def start(): # This is the start of the function for the welcome part. Vieri
- enter = raw_input("Before I let you in , we need authorization. Enter the Admin name.\n>")
- if enter in admin_username:
- enter2 = raw_input("What is the Password?\n>")
- print enter2
- if enter2 in admin_password:
- print "You're in!"
- stay = raw_input("Welcome, would you like to exit or browse? \n>")
- print stay
- if stay == "browse":
- print parts
- print raw_input("We have an unlimited supply of everything. What would you like to buy?\n>")
- if stay == "leave":
- print "Good day!"
- exit()
- else:
- print "INTERLOPER! Securtiy system activated, you have 10 seconds before decimation!"
- exit()
- def again():
- global money
- print "You have $%d left" %money
- if money == 0:
- print "You broke af."
- print "Good-day"
- else:
- start()
- print " "
- buy=raw_input()
- while money > 0:
- purchase()
Add Comment
Please, Sign In to add comment