newcommers=["Rick","Morty","Jerry","Mr Poopy Buthole","Karl Gustav VII","Erik"]
config['mealHistoryFile']="MealHistory.json"
day=1
Person("Mark")
defnewDay():
Person("Davide")
globalday
Person("Wille")
Person("Sven")
Person("David")
Person("Ahmed")
forname,personinpeople.iteritems():
person.attendanceRate=0.2+random.random()*0.8
points={}
points[3]=52
points[4]=69
points[5]=80
points[6]=90
points[7]=102
points[8]=112
points[9]=120
points[10]=135
important=['delicious','fabulous','very tasty','good','very good','not bad at all','favorable','ok','nutritious','italian','mouth-watering','objectively pleasing','aromatic','something to write home about','probably digestible','edible','a complex blend of carbon-based chemistry','not sanitized"); DROP TABLE MEALS;--','not poisoned','of unknown origin','crunchy','finger-licking good','fantastic','the best one we had so far','fancy','extrordinary','pleasant']
important=['delicious','fabulous','very tasty','good','very good','not bad at all','favorable','ok','nutritious','italian','mouth-watering','objectively pleasing','aromatic','something to write home about','probably digestible','edible','a complex blend of carbon-based chemistry','not sanitized"); DROP TABLE MEALS;--','not poisoned','of unknown origin','crunchy','finger-licking good','fantastic','the best one we had so far','fancy','extrordinary','pleasant']
newcommers=["Rick","Morty","Jerry","Mr Poopy Buthole","Karl Gustav VII","Erik"]
day=1
whileTrue:
#somebody-joining module
iflen(newcommers)>0andrandom.random()<0.1:
iflen(newcommers)>0andrandom.random()<0.1:
newbe=Person(newcommers.pop())
newbe=Person(newcommers.pop())
newbe.attendanceRate=0.2+random.random()*0.8
newbe.attendanceRate=0.2+random.random()*0.8
print"### NEW MEMBER ###"
print"### NEW MEMBER ###"
print"!!! {} has joined the group !!!"
print"!!! {} has joined the group !!!"
n_people=0
n_people=0
whilen_people<3:
whilen_people<3:
attendees=[]
attendees=[]
@ -149,22 +124,27 @@ if __name__ == '__main__':
print"{} people gained {} KukPoints each".format(n_people-1,payment)
print"{} people gained {} KukPoints each".format(n_people-1,payment)
print"The meal was {}!".format(random.choice(important[:day]))
print"The meal was {}!".format(random.choice(important[:day]))