Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """___________________
- Lunch Picker
- Version_0.2
- cwisbg
- Brandon Gillespie
- 1/30/2012
- ______________________
- """
- from datetime import datetime
- import random as r
- times = str(datetime.now())
- z = 0
- weekDay = ['Monday','Tuesday','Wednesday','Thursday','Friday']
- title = 'You will have', 'tomorrow'
- foodChoices = ['Ramen Noodles','lunch out','Cheese Stake','no lunch','left overs', 'sandwich', 'soup']
- weekFoods = []
- foods = open('E:/lunches.txt', 'w+')
- foods.write('Lunch for week of: '+times+'\n')
- for i in range(0,len(weekDay)):
- foodChoiceRange = len(foodChoices)-1
- randoC = r.randint(0,foodChoiceRange)
- if weekDay[z] == 'friday':
- print 'Friday lunch!'
- else:
- print title[0], foodChoices[randoC],'on',weekDay[z]
- addToWeekFood = title[0], foodChoices[randoC],'on',weekDay[z]
- weekFoods.append(addToWekFood)
- foods.write(str(foodChoices[randoC])+ ' '+weekDay[z]+'\n')
- foodChoices.pop(randoC)
- z += 1
- foods.close()
Advertisement
Add Comment
Please, Sign In to add comment