phrogeeb at hotmail.com
Fri Feb 7 04:33:38 CET 2003
Befuddled newbie attempts a program that calculates compound interest,
using a formula to the effect of:
(FV=Final Value, P = principal, r = interest rate, n = number of
Ok, so Python vets I bet are already seeing what my problem is. I ask
for the numbers with the syntax: r = input("r?")
My problem is that r is a percentage (in my program, I tell the user
to represent 4% as .04). When I run the program, it says that there's
no way to deal with a double or something to that effect. But I also
read that there's no way to type a variable, that they are
"dynamically typed". Well, that doesn't work here.
So, what do I do?
Thanx in advance.
(phrogeeb at hotmail.com)
More information about the Python-list