Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #input checker
- #prices
- #1-5 = 10$
- #0.1kg = 0.10$
- a_parcel_count = 0
- r_parcel_count = 0
- total_weight = 0
- while True:
- x = int(input("Enter the width of the parcel..."))
- y = int(input("Enter the length of the parcel..."))
- z = int(input("Enter the depth of the parcel..."))
- w = int(input("Enter the weight of the parcel..."))
- d = x + y + z
- if x <=80 and y <=80 and z <=80 and d <=200 and w >=1 and w <=10:
- print("Parcel Accepted!")
- a_parcel_count = a_parcel_count + 1
- total_weight = total_weight + (w)
- else:
- r_parcel_count = r_parcel_count + 1
- print("Parcel rejected due to...")
- if x >80:
- print("Width too big")
- if y >80:
- print("Length too big")
- if z >80:
- print("Depth too big")
- if d >200:
- print("Dimensions too big")
- if w <1:
- print("Weight too light")
- if w >10:
- print("Weight too heavy")
- print("\n")
- print("------Consignment Summary---------")
- print("Total number of accepted parcels is", (a_parcel_count))
- print("Total number of rejected parcels is", (r_parcel_count))
- print("Total consignment weight is", (total_weight), "kg")
- print("------Consignment Summary---------")
- print("\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement