[Tutor] Function problem

Kent Johnson kent_johnson at skillsoft.com
Sat Nov 6 13:43:36 CET 2004


At 12:26 PM 11/6/2004 +0300, Eri Mendz wrote:
>               getftemp = int(raw_input("enter fahrenheit temperature: "))
>
>How do i make the program accept decimal numbers, not just integers?

Use float() instead of int() to convert the input value:
getftemp = float(raw_input("enter fahrenheit temperature: "))

Kent



More information about the Tutor mailing list