hello,

I am currently working on an assignment in my IPT class and I am trying to get questions from my questions box randomly. I am able to do the random function but I do not want them to repeat. My 'questions box' is a dictionary and I have also imported tkinter. Please do help as it is due soon. This is what I am currently doing to get random things:

 number = random.randint(0,len(Questions_Box)-1
 q = Questions_Box[number]
 random.shuffle(Questions_Box)

Recommended Answers

All 2 Replies

The easiest way would be to remove a question once it has been asked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.