?887 2022-09-13 14:46 采纳率: 97.8%
浏览 28
已结题

python计算油漆体积

img

img


表面积除以铺展速率再乘以涂层数就等于油漆的体积,输出格式为[cans of paint] cans are required.

  • 写回答

4条回答 默认 最新

  • honestman_ 2022-09-13 15:04
    关注
    
    import math
    
    area = int(input('Enter the surface area'))
    rate = int(input('Enter the surface rate'))
    coats = int(input('Enter the surface coats'))
    volume = int(input('Enter the surface volume'))
    
    ret = (area/rate*coats)/volume
    print(f'{math.ceil(ret)} cans are required.')
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 9月21日
  • 已采纳回答 9月13日
  • 创建了问题 9月13日