Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.18 KB | None | 0 0
  1. #Lets Set our Variables Up...
  2. DOTW = {'Monday': 0, 'Tuesday': 0, 'Wednesday': 0, 'Thursday': 0, "Friday": 0, "Saturday": 0, "Sunday": 0}
  3. day = raw_input("what is today? \n >")
  4.  
  5.  
  6. def main(day):
  7.  
  8.     if day == "Monday":
  9.         print "Today is %s, How many hours would you like to add today?" % (day)
  10.         hours = int(raw_input())
  11.         DOTW['Monday'] = DOTW['Monday'] + hours
  12.         print "Cool your hours for %s are %d" %(day, DOTW['Monday'])
  13.         want = raw_input("Do you want to add more time? y/n \n > ")
  14.         overtime()
  15.         leave(want)
  16.    
  17.     if day == "Tuesday":
  18.         print "Ah, Today is %s, How many hours have you worked?" %(day)
  19.         hours = int(raw_input())
  20.         DOTW['Tuesday'] = DOTW['Tuesday'] + hours
  21.         print "alright, yours hours for %s are %d" %(day, DOTW['Tuesday'])
  22.         want = raw_input("Do you want to add more time? y/n \n > ")
  23.         overtime()
  24.         leave(want)
  25.        
  26.     if day == "Wednesday":
  27.         print "Ah, Today is %s, How many hours have you worked?" %(day)
  28.         hours = int(raw_input())
  29.         DOTW['Wednesday'] = DOTW['Wednesday'] + hours
  30.         print "Cool for %s I've got %d hours" %(day, DOTW['Wednesday'])
  31.         want = raw_input("Do you want to add more time? y/n \n > ")
  32.         overtime()
  33.         leave(want)
  34.    
  35.     if day == "Thursday":
  36.         print "Ah, Today is %s, How many hours have you worked?" %(day)
  37.         hours = int(raw_input())
  38.         DOTW['Thursday'] = DOTW['Thursday'] + hours
  39.         print "Your hours for %s are %d" %(day, DOTW['Thursday'])
  40.         want = raw_input("Do you want to add more time? y/n \n > ")
  41.         overtime()
  42.         leave(want)
  43.        
  44.     if day == "Friday":
  45.         print "FINALLY IT'S FRIDAY!!! How many hours have you worked?"
  46.         hours = int(raw_input())
  47.         DOTW['Friday'] = DOTW['Firday'] + hours
  48.         print "Cool. for %s I've got %d hours" %(day, DOTW['Friday'])
  49.         want = raw_input("Do you want to add more time? y/n \n > ")
  50.         overtime()
  51.         leave(want)
  52.        
  53.     if day == "Saturday":
  54.         print "Ah, Today is %s, How many hours have you worked?" %(day)
  55.         hours = int(raw_input())
  56.         DOTW['Saturday'] = DOTW['Saturday'] + hours
  57.         print "alright, yours hours for %s are %d" %(day, DOTW['Saturday'])
  58.         want = raw_input("Do you want to add more time? y/n \n > ")
  59.         overtime()
  60.         leave(want)
  61.        
  62.     if day =="Sunday":
  63.         print "Ah, Today is %s, How many hours have you worked?" %(day)
  64.         hours = int(raw_input())
  65.         DOTW['Sunday'] = DOTW['Sunday'] + hours
  66.         print "Cool your hours for %s are %d" %(day, DOTW['Monday'])
  67.         want = raw_input("Do you want to add more time? y/n \n > ")
  68.         overtime()
  69.         leave(want)
  70.  
  71. # Lets make this software do Thigns
  72.  
  73. def leave(want):
  74.     if want == "n":
  75.         overtime()
  76.         print "bye"
  77.         exit()
  78.        
  79.     elif want == "y":
  80.          day = raw_input("for What Day?")
  81.          main(day)
  82.          
  83. def overtime():
  84.     hoursWorked = DOTW['Monday'] + DOTW['Tuesday'] + DOTW['Wednesday'] + DOTW['Thursday'] + DOTW['Friday'] + DOTW ['Saturday'] + DOTW['Sunday']
  85.     if hoursWorked > 40:
  86.         overtimeHours = hoursWorked - 40
  87.         print "Woah there! you've worked %r hours! Have you cleared this with your manager??" % (hoursWorked, overtimeHours)
  88.     if hoursWorked < 40:
  89.         print "You've worked %r hours so far this week." % (hoursWorked)
  90.  
  91.  
  92. def PaycheckCalculator ():
  93.     print "You've called the paycheck calculator portion of the app. Check eeeet."
  94.  
  95. # Get Shit Started.    
  96. main(day)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement