JSRUN 用代码说话
精选py
全部py
import time def sum(): sz = 0 for i in range(1, 11): sz += i return sz zhoh = sum() print(f"1-10的总和为 : {zhoh}")


~苦涩(swdan)

2024-10-31 16:34
TempStr = input("请输入带有符号的温度值:") if TempStr[-1] in ['F','f']: C = (eval(TempStr[0:-1])-32)/1.8 print("转换后的温度是{:.2f}C".format[C]) elif TempStr[-1] in ['C','c']: F = eval(TempStr[0:-1])*1.8+32 print("转换后的温度是{:.2f}F".format(F)) else: print("输入格式错误")