temperatureConversion1】的更多相关文章

(原题:https://www.python123.io/student/courses/934/groups/8102/problems/programmings/6078) Solution: #方法一:异常处理与if单分支结合 n = input() try: if ("C" in n) or ("c" in n): n = n.strip("Cc") #将字符串n的首尾的C与c全部去掉,实际上只需去掉末尾,但不影响 F = eval(n)…