Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. class Worker:
  2.     def __init__(self,name,pay):
  3.         self.name = name
  4.         self.pay  = pay
  5.     def lastName(self):
  6.         return self.name.split()[-1]
  7.     def giveRaise(self, percent):
  8.         self.pay *= (1.0 + percent)
  9.        
  10. def Bob(message):
  11.     if message.find ('/raise'):
  12.         bob.giveRaise(4)
  13.  
  14.  
  15.    
  16. bob = Worker('Bob Smith', 2030)
  17.  
  18. print 'This is a simple worker sim programmed in Python.'
  19. raw_input("Press enter to begin.")
  20. print 'Bob Smith is a 23 year old male, working at McDonalds'
  21. print "You control Bob's life"
  22. print 'Type /raise <number> to give Bob a raise.'
  23. Bob(raw_input("Enter a command now:"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement