[Tutor] (no subject)

2014-12-18 Thread Abdullahi Farah Mohamud
hello i need help with a program and i dont understand what is wrong it is a lottery ticket generator. the problem is: when the computers asks the user if he would like to go again and the user says yes, it asks for the number of lines and then if the user clicks 3 it will only give me one line.

[Tutor] lottery problem (Was Re: (no subject))

2014-12-18 Thread Alan Gauld
On 18/12/14 21:10, Abdullahi Farah Mohamud wrote: hello i need help with a program and i dont understand what is wrong Please always add a meaningful subject line. when the computers asks the user if he would like to go again and the user says yes, it asks for the number of lines and then

Re: [Tutor] (no subject)

2014-12-18 Thread Steven D'Aprano
On Thu, Dec 18, 2014 at 09:10:40PM +, Abdullahi Farah Mohamud wrote: hello i need help with a program and i dont understand what is wrong it is a lottery ticket generator. the problem is: when the computers asks the user if he would like to go again and the user says yes, it asks for the

Re: [Tutor] lottery problem (Was Re: (no subject))

2014-12-18 Thread Adam Jensen
On Fri, 19 Dec 2014 00:55:49 + Alan Gauld alan.ga...@btinternet.com wrote: You could have used a list instead of all the individual variables line[0] = ... line[1] = ... But then you could get clever and use a loop: while lines != 0: start = 1 period = 7 for lineNum

Re: [Tutor] lottery problem (Was Re: (no subject))

2014-12-18 Thread Adam Jensen
On Thu, 18 Dec 2014 20:27:03 -0500 Adam Jensen han...@riseup.net wrote: And to build the 'lines' list (although, this is getting rather ugly): lines = [[random.randint(x,x+6) for x in range(1,50,7)] for i in range(7)] Oops, in the context of the original program this might make more sense