Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Assign the sum of 2 consecutive numbers in a list to a varibale
Post: RE: Assign the sum of 2 consecutive numbers in a l...

(Apr-04-2020, 10:05 PM)bowlofred Wrote: One method is to append each answer to another list. answers = [] for x, y in pairwise(questions): answers.append(input ("%d + %d " % (x, y))) It just cre...
Fenaz General Coding Help 3 2,111 Apr-05-2020, 07:04 AM
    Thread: Assign the sum of 2 consecutive numbers in a list to a varibale
Post: Assign the sum of 2 consecutive numbers in a list ...

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):...
Fenaz General Coding Help 3 2,111 Apr-04-2020, 08:35 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020