Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # Name: Story of my Life
- # Purpose: None at all
- #
- # Author: Kyle Zhou
- #
- # Created: 01/12/2011
- # Copyright: (c) Kyle Zhou 2011
- # Licence: <your licence>
- #-------------------------------------------------------------------------------
- #!/usr/bin/env python
- import math
- import random
- def main():
- Not_Motivated_To_Do_Work = True
- while Not_Motivated_To_Do_Work:
- Not_Motivated_To_Do_Work = Do_Random_Stuff()
- raw_input()
- print "Now I'm motivated to do work!"
- def Choose_Random_Task():
- Activities = {
- 1 : 'Play Games',
- 2 : 'Go on FB',
- 3 : 'Talk on MSN',
- 4 : 'Write programs',
- 5 : "Write useless pseudocode (that actually might function) to describe what you're doing at that moment",
- 6 : 'Sleep',
- 7 : 'Watch TV',
- 8 : 'Tweet',
- 9 : 'Eat',
- 10 : 'Other stuff'
- }
- Activity_To_Do = math.floor(random.random() * 10 + 1)
- return Activities[Activity_To_Do]
- def Do_Random_Stuff():
- Task = Choose_Random_Task()
- print Task
- # Check if re-motivated to do work
- MotivateNumber = random.random()
- if MotivateNumber < 0.09: # Arbitrarily chosen small number in range [0,1)
- return False
- else:
- return True
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement