I'm making a quiz game and i want questions to be randomly generated. The problem is i dont know how to make corresponding answers to questions and how to make them not to repeat. Also problem is that i get columns by index in in the answers
questions = [("Was Einshtein a genius?", "B"), ("How old is Putin?", "C"), ("What is my favourite dish?", "D"),
("Why i broke up with my girl?", "A" )]
answers = [["A. He is a fool", "B. Definetly", "C. He's stupid", "D. He's a gay"],
["A. 65", "B. 48", "C. 69", "D. 61"],
["A. Pizza", "B. KFC Chicken", "C. Big tasty", "D. Lazania"],
["A. She cheated on me", "B. She stole my phone", "C. She broke my phone", "D. She broke ,y heart"]]
ques_ran = random.randint(0,3)
for i in questions:
print(questions[ques_ran])
for key in answers:
print(key[ques_ran])
b = input('Enter an asnwer ')
I expect that each of these four questions with corresponding answers will display randomly and they won't repeat(there should be all 4 present questions with answers displaying for 4 iterations, one question on one iteration)