Apr-04-2020, 08:35 PM
import random no_questions = int(input("Enter the no of questions ")) questions = [] for i in range(0,no_questions*2): n = random.randrange(0,10) questions.append(n) def pairwise(iterable): a = iter(iterable) return zip(a, a) for x, y in pairwise(questions): input ("%d + %d " % (x, y))The output will ask to enter the value of x + y, how can I assign the answer of each question to different variables