On Thu, Sep 22, 2011 at 11:08 AM, Steven D'Aprano wrote:
> Joel Knoll wrote:
>
>> Given a range of integers (1,n), how might I go about printing them in the
>> following patterns:
>> 1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2 etc., e.g. for a "magic
>> square". So that for the range (1,5) for e
Joel Knoll wrote:
Given a range of integers (1,n), how might I go about printing them in the
following patterns:
1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2
etc., e.g. for a "magic square". So that for the range (1,5) for example I would get
1 2 3 42 3 4 13 4 1 24 1 2 3
I'm not sure what
On Thu, Sep 22, 2011 at 4:56 PM, Dave Angel wrote:
>
> The second correction is important, the first one wrong. The OP's example
> was looking for the numbers 1 through 4, so range(1,5) was correct.
> --
>
> DaveA
>
>
Ah, apologies. I misread the OP
__
On 09/22/2011 10:43 AM, Hugo Arts wrote:
forgot to forward to list:
From: Hugo Arts
Date: Thu, Sep 22, 2011 at 4:42 PM
Subject: Re: [Tutor] range question
To: d...@davea.name
On Thu, Sep 22, 2011 at 4:37 PM, Dave Angel wrote:
On 09/22/2011 10:27 AM, Joel Knoll wrote:
Given a range of
On Thu, Sep 22, 2011 at 10:37 AM, Dave Angel wrote:
> **
> On 09/22/2011 10:27 AM, Joel Knoll wrote:
>
> Given a range of integers (1,n), how might I go about printing them in the
> following patterns:
> 1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2
> etc., e.g. for a "magic square". So that for
forgot to forward to list:
From: Hugo Arts
Date: Thu, Sep 22, 2011 at 4:42 PM
Subject: Re: [Tutor] range question
To: d...@davea.name
On Thu, Sep 22, 2011 at 4:37 PM, Dave Angel wrote:
> On 09/22/2011 10:27 AM, Joel Knoll wrote:
>
> Given a range of integers (1,n), how might I
On 09/22/2011 10:27 AM, Joel Knoll wrote:
Given a range of integers (1,n), how might I go about printing them in the
following patterns:
1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2
etc., e.g. for a "magic square". So that for the range (1,5) for example I
would get
1 2 3 42 3 4 13 4 1 24 1 2
On Thu, Sep 22, 2011 at 10:27 AM, Joel Knoll wrote:
> Given a range of integers (1,n), how might I go about printing them in the
> following patterns:
>
> 1 2 3 4 ... n
> 2 3 4 5 ... n 1
> 3 4 5 6 ... n 1 2
>
> etc., e.g. for a "magic square". So that for the range (1,5) for example I
> would ge
Given a range of integers (1,n), how might I go about printing them in the
following patterns:
1 2 3 4 ... n2 3 4 5 ... n 13 4 5 6 ... n 1 2
etc., e.g. for a "magic square". So that for the range (1,5) for example I
would get
1 2 3 42 3 4 13 4 1 24 1 2 3
I just cannot figure out how to make the