Advertisement
Guest User

Untitled

a guest
Apr 15th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. def Main():
  2. Weight = float(input ("How much does your package weigh? :"))
  3. CalcShipping(Weight)
  4.  
  5. def CalcShipping(Weight):
  6.  
  7. if Weight>=2:
  8. PricePerPound=1.10
  9.  
  10. elif Weight>=2 & Weight<6:
  11. PricePerPound=2.20
  12.  
  13. elif Weight>=6 & Weight<10:
  14. PricePerPound=float(3.70)
  15.  
  16. else:
  17. PricePerPound=3.8
  18.  
  19. print ("The total shipping cost will be $%.2f") % (PricePerPound)
  20.  
  21.  
  22. Main()
  23.  
  24. print ("The total shipping cost will be $%.2f" % PricePerPound)
  25.  
  26. elif Weight >= 2 and Weight < 6:
  27. PricePerPound = 2.20
  28.  
  29. elif Weight >= 6 and Weight < 10:
  30. PricePerPound = 3.70
  31.  
  32. elif 2 <= Weight < 6:
  33. PricePerPound = 2.20
  34.  
  35. elif 6 <= Weight < 10:
  36. PricePerPound = 3.70
  37.  
  38. PricePerPound = 1.10
  39.  
  40. if 2 <= Weight < 6:
  41. PricePerPound = 2.20
  42.  
  43. elif 6 <= Weight < 10:
  44. PricePerPound = 3.70
  45.  
  46. elif Weight >= 10:
  47. PricePerPound = 3.8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement