Re: [Tutor] help with inch to cms conversion .

2013-02-11 Thread Danny Yoo
On Mon, Feb 11, 2013 at 9:06 AM, Pravya Reddy wrote: > Can you please help me with the code. > > #!/usr/bin/env python > """ > inchtocm.py > > """ > > def Inchtocm(inches): > """Returns 2.54 * inches""" > return (2.54 * float(inches_number1)) I don't know if your curriculum talks about w

Re: [Tutor] help with inch to cms conversion .

2013-02-11 Thread Dave Angel
On 02/11/2013 11:06 AM, Pravya Reddy wrote: Can you please help me with the code. #!/usr/bin/env python """ inchtocm.py """ First, remove that try/except until the code is free of obvious bugs. It's masking where the error actually occurs. Alternatively, include a variable there, and print

[Tutor] help with inch to cms conversion .

2013-02-11 Thread Pravya Reddy
Can you please help me with the code. #!/usr/bin/env python """ inchtocm.py """ def Inchtocm(inches): """Returns 2.54 * inches""" return (2.54 * float(inches_number1)) inches = None while True: try: inches_number1 = input(input("How many inches you want to convert: "))