Help! I need a \"PYTHON\" program, step by step for this one. Write a program th
ID: 663044 • Letter: H
Question
Help! I need a "PYTHON" program, step by step for this one.
Explanation / Answer
flatfee=3
totalfee=0
s=float(raw_input("Enter the Weight of the Package:"))
if s<=0 or s>50:
print "Invalid Weight"
else:
if s<=2:
totalfee=flatfee
elif s<=6:
totalfee=s*1.80
elif s<=10:
totalfee=s*1.70
elif s<=30:
totalfee=s*1.60
else:
totalfee=50
if totalfee!=0:
print "ShippingCharge:$%s"%str(totalfee)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.