Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread Alan Gauld
On 15/02/12 02:16, Tamar Osher wrote: I am hoping to find a professionally designed, serious, university level book (with exercises, with a learning disc, and answers, and an elaborately helpful website) that will carefully and surely guide me through learning computer programming with Python ve

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread wesley chun
tooting my own horn, http://corepython.com gets good reviews too. however, it does target existing programmers who want to learn Python as quickly and as comprehensively as possible. it's not a good book if you're a beginner to programming or are looking for a pure reference like PER or Nutshell.

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread leam hall
I will have to agree with both Wes and Alan, they provide great resources. However, the issue you will face is three-fold. You need to: 1. Write lots of good code. 2. Write lots more good code. 3. Show a whole lot of good code you've written. If you want to program professionally I suggest gettin

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread Joel Goldstick
On Wed, Feb 15, 2012 at 7:35 AM, leam hall wrote: > I will have to agree with both Wes and Alan, they provide great > resources. However, the issue you will face is three-fold. You need > to: > > 1. Write lots of good code. > 2. Write lots more good code. > 3. Show a whole lot of good code you've

[Tutor] Some help Please

2012-02-15 Thread JOSEPH MARTIN MPALAKA
take an example of updating Bank Accounts, gaving the following table: acc_id acc_namestanding_Balance mn0001 computer 2 my problem is how can i credit the standing balance from user data,as in making a deposit onto the computer account, using the cod

Re: [Tutor] Some help Please

2012-02-15 Thread Evert Rol
Hi Joseph, > take an example of updating Bank Accounts, > gaving the following table: > > acc_idacc_namestanding_Balance > mn0001computer 2 > > my problem is how can i credit the standing balance from user data,as > in making a deposi

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread Brett Ritter
On Wed, Feb 15, 2012 at 7:46 AM, Joel Goldstick wrote: > Programming is all about doing it -- over and over.  I think Malcolm > Gladwell proposed that it takes 10,000 hours to get good at anything. > Its great to be smitten, but there is no shortcut. Jumping in because this is a favorite topic of

Re: [Tutor] specific recommendation for a Python book, to move from baby-level to intermediate-level

2012-02-15 Thread Mark Lawrence
On 15/02/2012 02:16, Tamar Osher wrote: Hello! I have finished reading some Python tutorials. My favorite tutorial is the official tutorial at Python.org. I am hoping to find a professionally designed, serious, university level book (with exercises, with a learning disc, and answers, and

[Tutor] formatting sql Was: Some help Please

2012-02-15 Thread bob gailer
Welcome to python help. We are a few volunteers who donate time to assist. To assist you better: 1 - provide a meaningful subject line - such as "formatting sql" 2 - tell us what OS and Python version you are using. 3 - what is your prior Python experience? On 2/15/2012 9:17 AM, JOSEPH MARTIN M

Re: [Tutor] formatting sql Was: Some help Please

2012-02-15 Thread James Reynolds
On Wed, Feb 15, 2012 at 12:13 PM, bob gailer wrote: > Welcome to python help. We are a few volunteers who donate time to assist. > > To assist you better: > 1 - provide a meaningful subject line - such as "formatting sql" > 2 - tell us what OS and Python version you are using. > 3 - what is your

Re: [Tutor] Some help Please

2012-02-15 Thread Alan Gauld
On 15/02/12 14:17, JOSEPH MARTIN MPALAKA wrote: take an example of updating Bank Accounts, gaving the following table: acc_id acc_namestanding_Balance mn0001 computer 2 cur.execute("UPDATE accounts SET Standing_Amount = (Standing_Amount + dep) WH

[Tutor] Class definition confusion

2012-02-15 Thread Sivaram Neelakantan
I was under the impression that you have to define the attributes of the class before using it in an instance. Following the book 'thinking in Python', >>> class Point: ... """pts in 2d space""" ... >>> print Point __main__.Point >>> b = Point() >>> b.x =3 >>> b.y =4 >>> print b.y 4 >>> Why

[Tutor] specific recommendation for a Python book, to move

2012-02-15 Thread Cranky Frankie
The book I recommend is Python Programming, Third Edition, for the Absolute Beginner, by Michael Dawson. It's Python 3 based. You go from knowing nothing to writing video games. I think it's great. -- Frank L. "Cranky Frankie" Palmeri Risible Riding Raconteur & Writer “How you do anything is how

Re: [Tutor] formatting sql Was: Some help Please

2012-02-15 Thread Alan Gauld
On 15/02/12 18:03, James Reynolds wrote: >In you table the acc_id is 'mn0001' >In your sql Acc_ID = 'MN0001' >Why the difference in case? Normally, sql doesn't care about case with respect to table names. I believe in certain implementations they are always lower case, even if you p

Re: [Tutor] Class definition confusion

2012-02-15 Thread Alan Gauld
On 15/02/12 18:14, Sivaram Neelakantan wrote: I was under the impression that you have to define the attributes of the class before using it in an instance. Only in some languages. Python is not one of those. class Point: ... """pts in 2d space""" ... b = Point() b.x =3 b.y =4 print b.

Re: [Tutor] Class definition confusion

2012-02-15 Thread Hugo Arts
On Wed, Feb 15, 2012 at 7:14 PM, Sivaram Neelakantan wrote: > > I was under the impression that you have to define the attributes of > the class before using it in an instance.  Following the book > 'thinking in Python', > class Point: > ...     """pts in 2d space""" > ... print Point >

Re: [Tutor] Class definition confusion

2012-02-15 Thread Sivaram Neelakantan
On Thu, Feb 16 2012,Alan Gauld wrote: [snipped 19 lines] > Python allows instance attributes to be added at runtime. > In general this is a bad idea IMHO, a dictionary would probably > be more appropriate, but there can, very occasionally, be valid > uses for it. Thanks for that, I kept thinkin

Re: [Tutor] Class definition confusion

2012-02-15 Thread Mark Lawrence
On 15/02/2012 18:14, Sivaram Neelakantan wrote: I was under the impression that you have to define the attributes of the class before using it in an instance. Following the book 'thinking in Python', class Point: ... """pts in 2d space""" ... print Point __main__.Point b = Point() b.x

Re: [Tutor] formatting sql Was: Some help Please

2012-02-15 Thread James Reynolds
On Wed, Feb 15, 2012 at 1:30 PM, Alan Gauld wrote: > On 15/02/12 18:03, James Reynolds wrote: > > >In you table the acc_id is 'mn0001' >> >In your sql Acc_ID = 'MN0001' >> >Why the difference in case? >> >> Normally, sql doesn't care about case with respect to table names. I >> believ

Re: [Tutor] Class definition confusion

2012-02-15 Thread Mark Lawrence
On 15/02/2012 18:35, Hugo Arts wrote: [snip] An __init__ might seem like it's special in some way, declaring attributes. But it's not, really, it's just another method that gets passed the object it is called on (that would be "self"). It's only special because it gets called when an object is c

[Tutor] Debugging While Loops for Control

2012-02-15 Thread Luke Thomas Mergner
Hi, I've been translating and extending the Blackjack project from codeacademy.com into Python. My efforts so far are here: https://gist.github.com/1842131 My problem is that I am using two functions that return True or False to determine whether the player receives another card. Because of th