(Oct-20-2016, 12:11 PM)Yoriz Wrote: Do you know how to use lists, loops and functions?
You could make a list that has a (question, answer) tuple, shuffle the list, loop the list passing each iteration to a function that deals with asking for input agianst the passed in question and checks the input against the passed in answer.
hmm, i barely know how to use lists, loops and functions really...
(Oct-20-2016, 12:08 PM)metulburr Wrote: use the random modulethe second type looks easier but i need to use random.shuffle for this?>>> import random >>> lister = [1,2,3] >>> random.choice(lister) 3 >>> random.choice(lister) 1 >>> random.choice(lister) 3 >>> random.choice(lister) 3 >>> random.choice(lister) 2and one method is then you can make your question and correct answers as a dict such asquestions = { 'answer 1':'Question 1', 'answer 1':'Question 2', 'answer 1':'Question 3', }