[Tutor] (no subject)

2013-02-11 Thread Pravya Reddy
Can You Plaese help me with the code. #converts temperature to fahrenheit or celsius def print_options(): print ("Options:") print (" 'p' print options") print (" 'c' convert from celsius") print (" 'f' convert from fahrenheit") print (" 'q' quit the program") def celsius_to_

[Tutor] (no subject)

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: "))

[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: "))

[Tutor] calling and returning functions.

2013-02-11 Thread Pravya Reddy
Can you please complete the code. #!/usr/bin/env python """ One function receives a value in inches and returns the equivalent value in cms like cm = 2.54 * in.The other function receives a value in cms and returns the equivalent value in inches like in = cm / 2.54.""" def conversion(inch,cm):

[Tutor] print label error

2013-03-04 Thread Pravya Reddy
Hi I am having a builtin intendation error for print Addem(3,2).Does it vary for different versions of python? How to clear the error? def Addem(this, that): return this + that print Addem(3, 2) print Addem("book", "worm") print Addem(3.2, 1) try: print Addem("caution",1) exce