
September 22nd, 2003, 09:31 AM
|
|
Contributing User
|
|
Join Date: Dec 2001
Location: Houston, TX
Posts: 383
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 12
|
|
Uh, that and you aren't taking any input ... so ... it's not just that you were printing things wrong, but I see no raw_input() in there. Also, the easier way of doing the output is to use string formatting:
Code:
print "| %.2f | $%.2f | $%.2f |" % (I, G, T)
For example:
Code:
>>> I = 2.0; G = 3.0; T = 4.0
>>> print "| %.2f | $%.2f | $%.2f |" % (I, G, T)
| 2.00 | $3.00 | $4.00 |
And also, you might consider better variable names.
|