python day01
1.C = float(input(“请输入摄氏温度:>>”))
F = (9 / 5) * C + 32
print(“摄氏温度为:%.1f”%F)
运行结果:
PS C:\Users\admin> &E:/pathon/python.exe e:/Pythonfile/day01.py
请输入摄氏温度:>>43
摄氏温度为:109.42.port math
radius = float(input(“请输入圆柱的半径:>>”))
length = float(input(“请输入圆柱的高:>>”))
area = radius * radius * math.pi
print(“该圆柱的底面积为:%.4f”%area)
volume = area * length
print(“该圆柱的体积为:%.4f”%volume)
运行结果:
PS C:\Users\admin> & E:/pathon/python.exe e:/day01.py
请输入圆柱的半径:&