Python - Decision Generator

Categories: Programmering

Here’s a bit of python code I have written to help make difficult decisions in life.. :-)

#!/usr/bin/python
# Kenneth 2014
# http://www.holmq.dk
# Version 0.1
##########################
import random, time

class magickanswer:
def magic(self):
number = random.randrange(0,3,1);
return number;

def answer():
generate = magickanswer();
n = generate.magic();
options = [Yes,No,Maybe];
print Kenneth says: %s % options[n];

count = 0;
while count < 3: answer(); time.sleep(1); count = count+1;