python的第一次作业

python的第一次作业_第1张图片

f = float(input('请输入摄氏温度:'))
c = (9 / 5) * f + 32
print('%.1f摄氏度 = %.1f华氏度'%(f,c))
import math
radius = float(input("请输入圆柱体的半径:"))
length = float(input("请输入圆柱体的高:"))
area = radius * radius * math.pi
volume = area * length
print('面积:%.2f' % area)
print('体积:%.2f' % volume)

python的第一次作业_第2张图片

m = float(input('请输入长度:'))
s = m/o.305
print('%.1f英数=%.1f米数'%(m,s))
m = float(input('请输入水量:'))
f = float(input('请输入水的初始温度:'))
h = float(input('请输入水的最终温度:'))
q = m * (h - f) * 4184
print('%.1f能量'%(q))

python的第一次作业_第3张图片

m = float(input('请输入差额:'))
n = float(input('请输入年利率:'))
f = m * (n / 1200)
print('%.5f利息'%(f))
v0 = float(input('初始速度:'))
v1 = float(input('末速度:'))
t = float(input('时间:'))
a = (v1 - v0) / t
print('%.4f加速度'%(a))

python的第一次作业_第4张图片

first_name = float(input('请输入每个月的存款:'))
monthly_interest_rate = 0.05 / 12
rate = 1 + monthly_interest_rate
b = [0]
for i in range(6):
    now_money = (first_name + b[i]) * rate
    b.append(now_money)
print(b[6])
c = int(input('请输入一个0到1000的数'))
print(c)
bai = c % 10
shi = c // 10 % 10
ge = c //10 % 10 % 10
sum = bai + shi + ge
print(sum)

你可能感兴趣的:(python的第一次作业)