Re: This formating is really tricky

2014-08-27 Thread Seymore4Head
On Wed, 27 Aug 2014 09:16:43 +0200, Peter Otten <__pete...@web.de> wrote: >Seymore4Head wrote: > >> On Mon, 25 Aug 2014 18:22:35 -0400, Terry Reedy >> wrote: >> >>>On 8/25/2014 4:14 PM, Seymore4Head wrote: import random sets=3 for x in range(0, sets): pb2=random.choice([

Re: This formating is really tricky

2014-08-27 Thread Seymore4Head
On Tue, 26 Aug 2014 23:46:58 -0700, Larry Hudson wrote: >On 08/25/2014 08:14 PM, Seymore4Head wrote: >[snip] >> There is lots of help built in. Trying to read all the options makes >> me realize the stuff I am working on is just the tip of the iceberg. >> When checking the help function, it is c

Re: This formating is really tricky

2014-08-27 Thread Peter Otten
Seymore4Head wrote: > On Mon, 25 Aug 2014 18:22:35 -0400, Terry Reedy > wrote: > >>On 8/25/2014 4:14 PM, Seymore4Head wrote: >>> import random >>> sets=3 >>> for x in range(0, sets): >>> pb2=random.choice([1-53]) >> >>You want random.randint(1, 53) >>... >>> alist = sorted([pb1, pb2, p

Re: This formating is really tricky

2014-08-26 Thread Larry Hudson
On 08/25/2014 08:14 PM, Seymore4Head wrote: [snip] There is lots of help built in. Trying to read all the options makes me realize the stuff I am working on is just the tip of the iceberg. When checking the help function, it is clear I will never get to about 90% of the features. Thanks That

Re: This formating is really tricky

2014-08-26 Thread Gregory Ewing
Mark Lawrence wrote: from __past__ import print_statement (untested) I don't think the PEP for the __past__ module has been accepted yet, so you'd have to precede that with from __future__ import __past__ -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: This formating is really tricky

2014-08-26 Thread Seymore4Head
On Mon, 25 Aug 2014 18:22:35 -0400, Terry Reedy wrote: >On 8/25/2014 4:14 PM, Seymore4Head wrote: >> import random >> sets=3 >> for x in range(0, sets): >> pb2=random.choice([1-53]) > >You want random.randint(1, 53) >... >> alist = sorted([pb1, pb2, pb3, pb4, pb5]) >> print ("Your

Re: This formating is really tricky

2014-08-26 Thread Gene Heskett
On Tuesday 26 August 2014 12:13:37 Chris Angelico did opine And Gene did reply: > On Wed, Aug 27, 2014 at 2:09 AM, Mark Lawrence wrote: > > On 26/08/2014 12:24, MRAB wrote: > >> On 2014-08-26 06:57, Mark Lawrence wrote: > >>> On 26/08/2014 02:10, Joel Goldstick wrote: > you should try python

Re: This formating is really tricky

2014-08-26 Thread Mark Lawrence
On 26/08/2014 17:33, Chris Angelico wrote: On Wed, Aug 27, 2014 at 2:28 AM, Peter Otten <__pete...@web.de> wrote: No, "python-flight-attendant" ;) http://xkcd.com/353/ Would be nice if that could be made Python 3 compatible. ChrisA Easy. from __past__ import print_statement (untested) -

Re: This formating is really tricky

2014-08-26 Thread Chris Angelico
On Wed, Aug 27, 2014 at 2:28 AM, Peter Otten <__pete...@web.de> wrote: > No, "python-flight-attendant" ;) > > http://xkcd.com/353/ Would be nice if that could be made Python 3 compatible. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: This formating is really tricky

2014-08-26 Thread Peter Otten
MRAB wrote: > On 2014-08-26 06:57, Mark Lawrence wrote: >> On 26/08/2014 02:10, Joel Goldstick wrote: >>> you should try python-tudor mailing list >>> >> >> I'd try python-stewart and please don't top post, you've been around >> long enough and ought to know better :) >> > Should that be "python-s

Re: This formating is really tricky

2014-08-26 Thread Chris Angelico
On Wed, Aug 27, 2014 at 2:09 AM, Mark Lawrence wrote: > On 26/08/2014 12:24, MRAB wrote: >> >> On 2014-08-26 06:57, Mark Lawrence wrote: >>> >>> On 26/08/2014 02:10, Joel Goldstick wrote: you should try python-tudor mailing list >>> >>> I'd try python-stewart and please don't top po

Re: This formating is really tricky

2014-08-26 Thread Mark Lawrence
On 26/08/2014 12:24, MRAB wrote: On 2014-08-26 06:57, Mark Lawrence wrote: On 26/08/2014 02:10, Joel Goldstick wrote: you should try python-tudor mailing list I'd try python-stewart and please don't top post, you've been around long enough and ought to know better :) Should that be "python

Re: This formating is really tricky

2014-08-26 Thread Joel Goldstick
>>> you should try python-tudor mailing list >>> >> >> I'd try python-stewart and please don't top post, you've been around >> long enough and ought to know better :) >> > Should that be "python-stuart"? > -- > https://mail.python.org/mailman/listinfo/python-list Glad I could add to the discussion

Re: This formating is really tricky

2014-08-26 Thread MRAB
On 2014-08-26 06:57, Mark Lawrence wrote: On 26/08/2014 02:10, Joel Goldstick wrote: you should try python-tudor mailing list I'd try python-stewart and please don't top post, you've been around long enough and ought to know better :) Should that be "python-stuart"? -- https://mail.python.o

Re: This formating is really tricky

2014-08-26 Thread alister
On Tue, 26 Aug 2014 12:32:14 +0300, Marko Rauhamaa wrote: > alister : > >> Oh Wow I didn't know Python was that old - it even pre-dates >> Electricity :-) > > Electricity arose already before the Great Inflation. > > > Marko but it was not in controlled use by mankind at that time -- Whip

Re: This formating is really tricky

2014-08-26 Thread Marko Rauhamaa
alister : > Oh Wow I didn't know Python was that old - it even pre-dates > Electricity :-) Electricity arose already before the Great Inflation. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: This formating is really tricky

2014-08-26 Thread alister
On Mon, 25 Aug 2014 21:10:47 -0400, Joel Goldstick wrote: > you should try python-tudor mailing list > Oh Wow I didn't know Python was that old - it even pre-dates Electricity :-) -- Hand, n.: A singular instrument worn at the end of a human arm and commonly thrust into somebod

Re: This formating is really tricky

2014-08-25 Thread Chris Angelico
On Tue, Aug 26, 2014 at 4:17 PM, Gregory Ewing wrote: > Joel Goldstick wrote: >> >> you should try python-tudor mailing list > > ^ > Hmmm. I wonder what version of Python Henry VIII used? Version 8.0, in a modern numbering scheme. See, those letters after his name are

Re: This formating is really tricky

2014-08-25 Thread Gregory Ewing
Joel Goldstick wrote: you should try python-tudor mailing list ^ Hmmm. I wonder what version of Python Henry VIII used? -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: This formating is really tricky

2014-08-25 Thread Mark Lawrence
On 26/08/2014 02:10, Joel Goldstick wrote: you should try python-tudor mailing list I'd try python-stewart and please don't top post, you've been around long enough and ought to know better :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our la

Re: This formating is really tricky

2014-08-25 Thread Seymore4Head
On Mon, 25 Aug 2014 14:05:01 -0700 (PDT), Rustom Mody wrote: >On Tuesday, August 26, 2014 1:44:40 AM UTC+5:30, Seymore4Head wrote: >> BTW the exercise instructions say to use the choice function. I >> assume I had to include all the numbers to choose from instead of >> picking a random number fr

Re: This formating is really tricky

2014-08-25 Thread Seymore4Head
On Mon, 25 Aug 2014 21:52:24 +0100, Mark Lawrence wrote: >On 25/08/2014 21:14, Seymore4Head wrote: >> >> I included my shortcut for pb2. It doesn't work? Is there a short to >> prevent from listing each number? >> > >If it doesn't work then fix it and it will work. Alternatively define >what

Re: This formating is really tricky

2014-08-25 Thread Seymore4Head
On Tue, 26 Aug 2014 12:45:45 +1000, Steven D'Aprano wrote: >Seymore4Head wrote: > >> import random >> sets=3 >> for x in range(0, sets): >> pb1=random.choice([1,2,3,4,5,6,7,8,9,10 [...] 52,53]) >> pb2=random.choice([1-53]) > >You can avoid the annoyance of typing out long lists of sequent

Re: This formating is really tricky

2014-08-25 Thread Steven D'Aprano
Seymore4Head wrote: > import random > sets=3 > for x in range(0, sets): > pb1=random.choice([1,2,3,4,5,6,7,8,9,10 [...] 52,53]) > pb2=random.choice([1-53]) You can avoid the annoyance of typing out long lists of sequential numbers by using the range() function. And you can avoid writing o

Re: This formating is really tricky

2014-08-25 Thread Seymore4Head
On Mon, 25 Aug 2014 20:51:36 -0400, Seymore4Head wrote: >On Mon, 25 Aug 2014 18:22:35 -0400, Terry Reedy >wrote: > >>On 8/25/2014 4:14 PM, Seymore4Head wrote: >>> import random >>> sets=3 >>> for x in range(0, sets): >>> pb2=random.choice([1-53]) >> >>You want random.randint(1, 53) >>... >I

Re: This formating is really tricky

2014-08-25 Thread Joel Goldstick
you should try python-tudor mailing list On Mon, Aug 25, 2014 at 8:52 PM, Seymore4Head wrote: > On Tue, 26 Aug 2014 00:48:52 +0200, Peter Otten <__pete...@web.de> > wrote: > >>Terry Reedy wrote: >> >>> On 8/25/2014 4:14 PM, Seymore4Head wrote: import random sets=3 for x in range(0,

Re: This formating is really tricky

2014-08-25 Thread Seymore4Head
On Tue, 26 Aug 2014 00:48:52 +0200, Peter Otten <__pete...@web.de> wrote: >Terry Reedy wrote: > >> On 8/25/2014 4:14 PM, Seymore4Head wrote: >>> import random >>> sets=3 >>> for x in range(0, sets): >>> pb2=random.choice([1-53]) >> >> You want random.randint(1, 53) >> ... >>> alist = so

Re: This formating is really tricky

2014-08-25 Thread Seymore4Head
On Mon, 25 Aug 2014 18:22:35 -0400, Terry Reedy wrote: >On 8/25/2014 4:14 PM, Seymore4Head wrote: >> import random >> sets=3 >> for x in range(0, sets): >> pb2=random.choice([1-53]) > >You want random.randint(1, 53) >... I agree with you that random.randint would be what I would use too, but

Re: This formating is really tricky

2014-08-25 Thread Peter Otten
Terry Reedy wrote: > On 8/25/2014 4:14 PM, Seymore4Head wrote: >> import random >> sets=3 >> for x in range(0, sets): >> pb2=random.choice([1-53]) > > You want random.randint(1, 53) > ... >> alist = sorted([pb1, pb2, pb3, pb4, pb5]) >> print ("Your numbers: {} Powerball: {}".format

Re: This formating is really tricky

2014-08-25 Thread Terry Reedy
On 8/25/2014 4:14 PM, Seymore4Head wrote: import random sets=3 for x in range(0, sets): pb2=random.choice([1-53]) You want random.randint(1, 53) ... alist = sorted([pb1, pb2, pb3, pb4, pb5]) print ("Your numbers: {} Powerball: {}".format(alist, pb6)) I am trying this example.

Re: This formating is really tricky

2014-08-25 Thread Rustom Mody
On Tuesday, August 26, 2014 1:44:40 AM UTC+5:30, Seymore4Head wrote: > BTW the exercise instructions say to use the choice function. I > assume I had to include all the numbers to choose from instead of > picking a random number from 1-53 or 1-42. > I included my shortcut for pb2. It doesn't wor

Re: This formating is really tricky

2014-08-25 Thread Mark Lawrence
On 25/08/2014 21:14, Seymore4Head wrote: I included my shortcut for pb2. It doesn't work? Is there a short to prevent from listing each number? If it doesn't work then fix it and it will work. Alternatively define what "it doesn't work" means as I've run out of crystal balls, every singl

This formating is really tricky

2014-08-25 Thread Seymore4Head
import random sets=3 for x in range(0, sets): pb1=random.choice([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53]) pb2=random.choice([1-53]) pb3=random.choice([1,2,3,4,5,6,7,8,9,10,11,12,13,1