Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Worker:
- def __init__(self,name,pay):
- self.name = name
- self.pay = pay
- def lastName(self):
- return self.name.split()[-1]
- def giveRaise(self, percent):
- self.pay *= (1.0 + percent)
- def Bob(message):
- if message.find ('/raise'):
- bob.giveRaise(4)
- bob = Worker('Bob Smith', 2030)
- print 'This is a simple worker sim programmed in Python.'
- raw_input("Press enter to begin.")
- print 'Bob Smith is a 23 year old male, working at McDonalds'
- print "You control Bob's life"
- print 'Type /raise <number> to give Bob a raise.'
- Bob(raw_input("Enter a command now:"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement