David wrote:
but when I change it to;
start_total()
start = start_total()
a = Account(start)
here is the error;
Enter Amount: 100
Traceback (most recent call last):
File "./py_pettycash.py", line 77, in
menu()
File "./py_pettycash.py", line 53, in menu
a.deposit(cash)
File "./py_
Andre Engels wrote:
The more preferable method is to leave the class alone, and call
getbalance by hand:
data = float('100.00')
a = Account(data)
p = a.getbalance()
print 'balance = ', p
remove_data = float('50.00')
a.withdraw(remove_data)
w = a.getbalance()
print "withdraw = ", w
add_data = f
Thank you spir and Andre for the explanation. You are very good
teachers. I can now continue. I am sure I will be back. Next I am going
to set up a menu to enter amounts and also a way to store the resulting
balance. Is cPickle a good way to do this?
-david
--
Powered by Gentoo GNU/LINUX
http:/
Thank you spir and Andre for the explanation. You are very good
teachers. I can now continue. I am sure I will be back. Next I am going
to set up a menu to enter amounts and also a way to store the resulting
balance. Is cPickle a good way to do this?
-david
--
Powered by Gentoo GNU/LINUX
http
On Fri, Feb 27, 2009 at 6:06 AM, David wrote:
> Hi Everyone,
> I go through the archived [Tutor] mail list to find programs others have
> tried to do. I found one that would keep track of a petty cash fund. please
> point out my misunderstanding.
> Here is what I started with;
>
> #!/usr/bin/pyth
Le Fri, 27 Feb 2009 00:06:59 -0500,
David s'exprima ainsi:
> Hi Everyone,
> I go through the archived [Tutor] mail list to find programs others have
> tried to do. I found one that would keep track of a petty cash fund.
> please point out my misunderstanding.
> Here is what I started with;
>
>
Le Fri, 27 Feb 2009 00:06:59 -0500,
David s'exprima ainsi:
> Hi Everyone,
> I go through the archived [Tutor] mail list to find programs others have
> tried to do. I found one that would keep track of a petty cash fund.
> please point out my misunderstanding.
> Here is what I started with;
>
[