vendredi 30 septembre 2016

Multiple Choice Quiz With Randomising Answer Positions PYTHON 3.5.2

I am creating a Que Card quiz in which a keyword from a text file is chosen at random, the program should then show the correct definition along with 2 other incorrect definitions that are in the text file as well. So far I have the keyword, the correct definition and the 2 incorrect definitions stored inside a list. Is there anyway that I can randomise the order of the items in the list and randomise their positions when the user is answering the question. I have tried to look this up but I can't find anything.

Example:

"Keyword is frog 1: Frogs are blue 2: Frogs are Green 3: Frogs are purple " But then the next time the keyword frog comes up they will be in different orders.

"Keyword is frog 1: Frogs are green 2: Frogs are blue 3: Frogs are purple "




Aucun commentaire:

Enregistrer un commentaire