cwisbg

Lunch Picker v_0.2

Jan 30th, 2012
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.00 KB | None | 0 0
  1. """___________________
  2.    Lunch Picker
  3.    Version_0.2
  4.    
  5.    cwisbg
  6.    Brandon Gillespie
  7.    1/30/2012
  8. ______________________      
  9. """
  10. from datetime import datetime
  11. import random as r
  12. times = str(datetime.now())
  13. z = 0
  14. weekDay = ['Monday','Tuesday','Wednesday','Thursday','Friday']
  15. title = 'You will have', 'tomorrow'
  16. foodChoices = ['Ramen Noodles','lunch out','Cheese Stake','no lunch','left overs', 'sandwich', 'soup']
  17. weekFoods = []
  18. foods = open('E:/lunches.txt', 'w+')
  19. foods.write('Lunch for week of: '+times+'\n')
  20. for i in range(0,len(weekDay)):
  21.     foodChoiceRange = len(foodChoices)-1
  22.     randoC = r.randint(0,foodChoiceRange)
  23.     if weekDay[z] == 'friday':
  24.         print 'Friday lunch!'
  25.     else:
  26.         print title[0], foodChoices[randoC],'on',weekDay[z]
  27.         addToWeekFood = title[0], foodChoices[randoC],'on',weekDay[z]
  28.     weekFoods.append(addToWekFood)
  29.     foods.write(str(foodChoices[randoC])+ ' '+weekDay[z]+'\n')
  30.     foodChoices.pop(randoC)  
  31.     z += 1
  32. foods.close()
Advertisement
Add Comment
Please, Sign In to add comment