[Tutor] Beginner problem: name 'convertToFahrenheit' is not defined
Kent Johnson
kent37 at tds.net
Sat Aug 16 18:40:19 CEST 2008
On Sat, Aug 16, 2008 at 12:07 PM, Matti/Tritlo <icetritlo at gmail.com> wrote:
Some quick notes:
> print options()
No need for the 'print' here, options() already prints. The extra
print will print the return value of options(), which is None.
> def triangle_area(width, height):
> return width * height / 2
This will give an incorrect result if width and height are both odd
integers. Use 2.0 instead of 2 to force float division.
Kent
More information about the Tutor
mailing list