Re: [Tutor] Income calculator

2007-09-20 Thread Alan Gauld
"bhaaluu" <[EMAIL PROTECTED]> wrote > Now he needs to add a way to save the details to a file, and open > the file to edit the details. If I'm not mistaken, since the details > are > in dictionary form, a 'pickle' is called for? =) I think you are thinking of a shelve which looks a lot like a

[Tutor] Income calculator

2007-09-20 Thread Ulrich Holtzhausen
Boykie Mackay wrote: > I have tried the code and it does give a syntax error.Another lesson for > me I guess.I should test code before posting,unless I'm sure of my post. > > The problem was with the brackets in lines 17/18.I got the code running > but I don't think the 'quit' function works as it

Re: [Tutor] Income calculator

2007-09-20 Thread bhaaluu
On 9/20/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "Boykie Mackay" <[EMAIL PROTECTED]> wrote > > >I have tried the code and it does give a syntax error.Another lesson > >for > > me I guess.I should test code before posting,unless I'm sure of my > > post. > > It's a good idea, but don't worry abo

Re: [Tutor] Income calculator

2007-09-20 Thread Alan Gauld
"Boykie Mackay" <[EMAIL PROTECTED]> wrote >I have tried the code and it does give a syntax error.Another lesson >for > me I guess.I should test code before posting,unless I'm sure of my > post. It's a good idea, but don't worry about it. I've been caught out a few times myself. Alan G

Re: [Tutor] Income calculator

2007-09-20 Thread Boykie Mackay
I have tried the code and it does give a syntax error.Another lesson for me I guess.I should test code before posting,unless I'm sure of my post. The problem was with the brackets in lines 17/18.I got the code running but I don't think the 'quit' function works as it should. Being a novice I thin

Re: [Tutor] Income calculator

2007-09-20 Thread Ulrich Holtzhausen
Alan Gauld wrote: > "Boykie Mackay" <[EMAIL PROTECTED]> wrote > > >> doesn't seem to be properly formatted.There should be a comma after >> the >> closing quotation marks,a closing bracket after the first variable >> and a >> % sign before the next i.e: >> >> >>> print "Your expected earn

Re: [Tutor] Income calculator

2007-09-20 Thread Alan Gauld
"Boykie Mackay" <[EMAIL PROTECTED]> wrote > doesn't seem to be properly formatted.There should be a comma after > the > closing quotation marks,a closing bracket after the first variable > and a > % sign before the next i.e: > >> print "Your expected earnings for %s is %d", >> %(financeLogs['m

Re: [Tutor] Income calculator

2007-09-20 Thread Boykie Mackay
I don't know if it's any help,but the line mentioned in the error message; File "./pyfinances.py", line 18 >print "Your expected earnings for %s is %d" % > (financeLogs['month'], > financeLogs['total']) >^ doesn't seem to be properly formatted.There sh

Re: [Tutor] Income calculator

2007-09-20 Thread Alan Gauld
"Ulrich Holtzhausen" <[EMAIL PROTECTED]> wrote First the good news, what you are doing should work. > File "./pyfinances.py", line 18 >print "Your expected earnings for %s is %d" % > (financeLogs['month'], > financeLogs['total']) >^ > SyntaxError: invalid syntax > > Non-working pro

Re: [Tutor] Income calculator

2007-09-19 Thread Michael Langford
On 9/19/07, Ulrich Holtzhausen <[EMAIL PROTECTED]> wrote: > > > > I can't seem to figure out how to fix it, also, if there's a shorter way > of doing this effectively, please help :) . > > > Instead of a keys in a dict, you should think about making a financeRecord class to hold the data. Don't wor

Re: [Tutor] Income calculator

2007-09-19 Thread Eike Welk
On Thursday 20 September 2007 01:00, Ulrich Holtzhausen wrote: > Non-working program: http://pastebin.com/f4da62e57 There seems to be a closing bracket ')' missing at the end of line 17. In line 18 there is a bracket missing too, in the code at pastebin, but nut in the error message. So this see

[Tutor] Income calculator

2007-09-19 Thread Ulrich Holtzhausen
--- Begin Message --- Hi there, I started out with Python about two days ago, it's my very first shot at programming and I find it quite interesting. Anyway I'll get to the point: I made a simple script that works, albeit not the shortest way I think but it works, however I would like to ma

[Tutor] Income calculator

2007-09-19 Thread Ulrich Holtzhausen
Hi there, I started out with Python about two days ago, it's my very first shot at programming and I find it quite interesting. Anyway I'll get to the point: I made a simple script that works, albeit not the shortest way I think but it works, however I would like to make it a bit more "fancy" t

Re: [Tutor] Income calculator

2007-09-19 Thread Ian Witham
Your links aren't working for me. On 9/20/07, Ulrich Holtzhausen <[EMAIL PROTECTED]> wrote: > > Hi there, > > I started out with Python about two days ago, it's my very first shot at > programming and I find it quite interesting. Anyway I'll get to the point: > > I made a simple script that works,

[Tutor] Income calculator

2007-09-19 Thread Ulrich Holtzhausen
Hi there, I started out with Python about two days ago, it's my very first shot at programming and I find it quite interesting. Anyway I'll get to the point: I made a simple script that works, albeit not the shortest way I think but it works, however I would like to make it a bit more "fancy" t