Initial commit: Python learning project with examples and exercises

This commit is contained in:
2025-07-20 17:08:50 +08:00
commit bc7bb56271
111 changed files with 11535 additions and 0 deletions
@@ -0,0 +1,10 @@
#e1.1TempConvert.py
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 = 1.8*eval(TempStr[0:-1]) + 32
print("转换好的温度是{:.2f}F".format(F))
else:
print("输入格式错误")