def c_to_f (): f_temp= float(1.8 *c_temp) + 32
print("The value in Fahrenheit is: " + f_temp)Enter temperature in Celsius to convert to Fahrenheit56
The value in Fahrenheit is: float(1.
此程序在python2中运行正常,但在python3中运行时,在提示符处输入'1‘后会打印错误。我想知道是否仍然有一种方法可以在if语句中接受用户输入,或者我是否必须以不同的方式来处理。我的程序如下:select_one = input('Please enter a number from the menu below:
\n1.Convert Celcius
我有一个简单的IHP应用程序,可以将华氏温度转换为摄氏度。我已经剥离了许多文件,以便应用程序的大部分位于以下文件中: https://github.com/dharmatech/ConvertTemperatureIhp/blob/000-minimal/Web/FrontController.hs 该文件的内容如下所示: module Web.FrontController where
import IH