Re: [python-uk] Help Please

2007-02-01 Thread Mamading Ceesay
On 29/01/07, Python Freak <[EMAIL PROTECTED]> wrote: > > As I am new to Python, > I am clueless about where to start. > There are books such as Learning Python from O'Reilly and Beginning Python from Apress. There is also the tutor mailing list for folks who want to ask questions regarding how to

Re: [python-uk] Help Please

2007-02-01 Thread Tim Diggins
> How do I go from here to creating an incidence list representation and > adjacency matrix? (is it possible to assign to individual items in each tuple? I guess not). You're right python tuples are immutable (1,2,3), whereas python lists [1,2,3] are mutable. However which you use is really a

Re: [python-uk] Help Please

2007-01-29 Thread Python Freak
Okay I finally got the adjancency list representation working: v = range(1,11) al=zip(v[:-1],v[1:])+[(10,)] Is that right? It works fine. How do I go from here to creating an incidence list representation and adjacency matrix? (is it possible to assign to individual items in each tuple? I g

Re: [python-uk] Help Please

2007-01-28 Thread Python Freak
Okay, how about this: I don't know how to create the adjacency list at the first place! Can you get me started please? If I start then I can make an attempt to create the incidence list and the adjacency matrix representation. Here is the question again: Consider a digraph with 10 vertices, labe

Re: [python-uk] Help Please

2007-01-28 Thread Zeth Green
On 29/01/07, Python Freak <[EMAIL PROTECTED]> wrote: > I am clueless about where to start. Okay, I did economics for my first degree so we have something in common! (Although I am not sure my maths ever got that deep). There are many ways to do what you want. The first step is to mentally translat

Re: [python-uk] Help Please

2007-01-28 Thread Python Freak
Guys, The question I posted is taken from an exercise sheet which I will discuss with my study group -- nothing graded. I am a graduate student trying to learn Python for some application in microeconomics. As I am new to Python, I am clueless about where to start. I apologise if this caused any

Re: [python-uk] Help Please

2007-01-28 Thread Zeth Green
On 29/01/07, Michael Sparks <[EMAIL PROTECTED]> wrote: > Is this homework? I was about to respond with a literal answer but I thought that too. It was the mathematical terminology but especially this bit that made me suspect: > On Sunday 28 January 2007 22:45, Python Freak wrote: Hint: You may fi

Re: [python-uk] Help Please

2007-01-28 Thread Michael Sparks
On Sunday 28 January 2007 22:45, Python Freak wrote: > Hi, > > This may be too elementary for most of you, but could you please help me > with the following question? I would like to use comprehensive lists and > lists of lists. Where do I start? > > Question: > > Consider a digraph with 10 vertice