跟据产品尺寸,求模具吨位(仅限1+1)

#_*_ coding:utf-8 _*_
# author choco
product_wide = input("请输入产品的宽(mm):")
product_wide = int(product_wide)
product_long = input("请输入产品的长(mm):")
product_long = int(product_long)
if product_long < product_wide:
i = product_wide
product_wide = product_long
product_long = i
#长宽转换
#cav = input("请输入穴数:")
#if cav == 2:
if product_long < product_wide*2+30:
wide = product_long
else:
if product_long > product_wide*4:
a = 0.15
elif product_long > product_wide*3:
a = 0.1
elif product_long > product_wide*2:
a = 0.05
else:
a = 0
wide = product_wide*2+30+(product_long*a)
#else:
# wide = product_wide + (product_long*0.1)
#print(wide)
#mould_wide = wide*2+150
#print("你需要的模具宽度为:",mould_wide)
if wide <= 50:
mould_wide = wide + 200
elif wide > 50 and wide <= 100:
mould_wide = wide + 220
elif wide >100 and wide <= 150:
mould_wide = wide + 240
elif wide >150 and wide <= 200:
mould_wide = wide + 270
elif wide >200 and wide <= 250:
mould_wide = wide + 300
elif wide >250 and wide <= 300:
mould_wide = wide + 330
elif wide >300 and wide <= 350:
mould_wide = wide + 360
elif wide >350 and wide <= 400:
mould_wide = wide + 400
elif wide >400 and wide <= 450:
mould_wide = wide + 450
else:
mould_wide = wide + 500
print("你需要的模具宽度尺寸为:",mould_wide,wide)
#else:
# if product_long < product_wide*2+50:
# wide = product_long
# else:
# wide = product_wide*2+50
# break
if mould_wide < 310:
print("你需要的模具吨位为:58T")
elif mould_wide >=310 and mould_wide < 360:
print("你需要的模具吨位为:86T")
elif mould_wide >=360 and mould_wide < 410:
print("你需要的模具吨位为:120T")
elif mould_wide >=410 and mould_wide < 455:
print("你需要的模具吨位为:160T")
elif mould_wide >=455 and mould_wide < 510:
print("你需要的模具吨位为:200T")
elif mould_wide >=510 and mould_wide < 570:
print("你需要的模具吨位为:250T")
elif mould_wide >=570 and mould_wide < 660:
print("你需要的模具吨位为:300T")
elif mould_wide >=660 and mould_wide < 710:
print("你需要的模具吨位为:360T")
elif mould_wide >=710 and mould_wide < 780:
print("你需要的模具吨位为:450T")
elif mould_wide >=780 and mould_wide < 800:
print("你需要的模具吨位为:530T")
elif mould_wide >=800 and mould_wide < 895:
print("你需要的模具吨位为:650T")
elif mould_wide >=895 and mould_wide < 980:
print("你需要的模具吨位为:780T")
elif mould_wide >=980 and mould_wide < 1000:
print("你需要的模具吨位为:900T")
elif mould_wide >=1000 and mould_wide < 1090:
print("你需要的模具吨位为:1000T")
elif mould_wide >=1090 and mould_wide < 1250:
print("你需要的模具吨位为:1250T")
elif mould_wide >=1250 and mould_wide < 1450:
print("你需要的模具吨位为:1400T")
posted @ 2018-05-18 10:26  业余py  阅读(650)  评论(0编辑  收藏  举报