Description
编写程序,读入英尺数,将其转换为米数并显示结果。一英尺等于0.305米。
Input
输入一个数 (英尺)
Output
输出的数字四舍五入保留小数点后2位
Sample Input
10.5
Sample Output
3.20 meters
Hint
注意单位,1 meter or 2 meters
const_number = 0.305
input_data = input()
input_data = input_data.split()
number = float(input_data[0])new = number*const_numberresult = int(new*1000)
remain = result%10
if remain>=5:result +=10
result = int(result/10)
result = result/100.0if new <= 1.0:print("{:.2f} meter".format(result))
else:print("{:.2f} meters".format(result))