Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- print "Welcome to Remote Access Mainframe T-8999 - Please enter login"
- print "-----------------------------------------"
- allowed_users = ["admin"]
- password = ["admin"]
- username = raw_input("Please enter your username")
- if username in allowed_users:#checks if the input is included in the array
- xyz = raw_input("enter your password")#makes person input password after determining correct username
- if xyz in password: #checks if password is in the array
- print "Access Granted"
- print """Welcome to US ARMY DEPOT 8872, Commander. You have 1000 dollars in your balance. Spend it wisely... """
- else:
- print "Access Denied"
- print "Wrong Password, restart system"
- exit()
- else:
- print "Access Denied"
- print "Restart the system"
- exit ()
- rofl = 2 #comes into play later when exiting
- cash = 1000 #total cash
- pc_parts = ['AMD 8350 8 Core Processor' , 'Asus Sabertooth Motherboard AM3+ Socket', 'Noctua Nh-D15 CPU Cooler','Corsair Vengeance 8 GB RAM', 'Samsung 840 SSD 120GB', 'Nvidia GTX 960 GPU','Fractal Design R4 Black Case','Microsoft Windows 7 Home Premium','Logitech G600 MMO Gaming Mouse','Razer Ultimate BlackWidow','Asus VS247H-P 23.6 Monitor']
- prices_parts = [165, 175, 89 , 42 , 75 , 185 , 70 , 200 , 80 , 100, 111]
- #arrays for the merch
- def pcparts ():
- print" \n1.) Amd 8350: 165$\n2.)Motherboard: 175$\n 3.)Noctua Cooler: 89$\n 4.)Corsair RAM: 42$\n 5.)120 GBSSD: 75$\n 6.)Nvidia 960 GPU: 185$\n 7.)Fractal Case 70\n 8.)Windows 7 OEM 200$\n 9.)Logitech G600 Mouse 80$\n 10.)Razer BlackWidow 100$\n 11.) ASUS Monitor 111$\n"
- def buy(cash): #overall function to purchase games, triggered by an if statement
- input2 = raw_input("Choose a part: \n1.) Amd 8350: 165$\n2.)Motherboard: 175$\n 3.)Noctua Cooler: 89$\n 4.)Corsair RAM: 42$\n 5.)120 GBSSD: 75$\n 6.)Nvidia 960 GPU: 185$\n 7.)Fractal Case 70\n 8.)Windows 7 OEM 200$\n 9.)Logitech G600 Mouse 80$\n 10.)Razer BlackWidow 100$\n 11.) ASUS Monitor 111$\n")
- purchase = int(input2) #people put in an interger to determine the games outlined in input2
- if input2 == '1' or '2' or '3' or '4' or '5' or '6' or '7' or '8' or '9' or '10' or '11':
- print 'My [insert family member] does not like that brand, sure wanna to purchase %s for %d dollars plus taxes and shipping?' %(pc_parts[purchase - 1], prices_parts[purchase - 1])
- print "You are being taxed 7% for this product, plus a $8 shipping and handling fee on every product this totals to: "
- print prices_parts[purchase - 1] + purchase * 0.07 + 8
- print "My point still stands , yes or no?"
- authentication = raw_input() #final confirmn for the game
- if authentication == 'yes': #if yes
- if cash >= prices_parts[purchase -1]: #Inequality to determine if you have enough cash
- cash = cash - prices_parts[purchase - 1] + purchase * 0.07 + 8 #purchase denotes the game , and we are subtracting the game from the list + 0.07 taxes and shipping
- a= random.choice("ABCD")*3 ##barcode
- b= random.choice("FGHJKLA")*2
- c= random.choice("123456789")*2
- d= random.choice("ZXCIOPRTG")*2
- print a + b + c + d , "This is your Part's Barcode" #adds up barcode
- else:
- print "You are broke, you cannot buy this part" #if one is down on money
- elif authentication == 'no':
- print "Look around bro, my [insert family member] is always right man!" #if one says no
- return cash #states the new cash after the purchase
- while rofl == 2:
- print '\nWelcome , You have %d$ on you' %cash #states cash
- choice = raw_input('\nHey Wanna look at our PARTS, PURCHASE, or LEAVE?!')
- if choice == 'parts': #choices are listed above.
- pcparts() #triggers and prints function
- elif choice == 'purchase':
- cash = buy(cash) #triggers the function
- elif choice == 'leave':
- print 'Goodbye and I hope you had a great experience!'
- rofl = 3 #rofl used to change variable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement