Answer:
truckCapacity = 1000
totalWeight = 0
eastZone = 0
southZone = 0
westZone = 0
northZone = 0
n = 0
while True:
wt = int(input("Pleas enter the weight of the package:"))
id = int(input("Pleas enter the package ID number:"))
zone = input("Pleas enter the zone:")
totalWeight = totalWeight + wt
if totalWeight <= 1000:
print("The following pacakage is on the truck:")
print("Pkg id =",id, "Zone =",zone,"Pkg wgt:",wt)
print("\n")
n = n + 1
if zone == "South":
southZone = southZone + 1
if zone == "East":
eastZone = eastZone + 1
if zone == "West":
westZone = westZone + 1
if zone == "North":
northZone = northZone + 1
else:
print(eastZone, "packages are on the truck for East zone")
print(westZone, "packages are on the truck for West zone")
print(northZone, "packages are on the truck for North zone")
print(southZone, "packages are on the truck for South
zone\n\n")
print(n," pacakges are loaded on the truck")
break
Output:
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
The post office is sending packages to the airport to be shipped to different zones in...
Create a Wpf application Use Visual Studios 2019 A shipping company receives packages at its headquarters, which functions as its shipping hub. After receiving the packages the company ships them to a distribution center in one of the following states: Alabama, Florida, Georgia, Kentucky, Mississippi, North Carolina, South Carolina, Tennessee, West Virginia or Virginia. The company needs an application to track the packages that pass through its shipping hub. The application generates a package ID number for each package that...
Carlsberg in Emerging Markets A breeze of optimism blew through the office of Carlsberg A/S’s CEO, Jørgen Buhl Rasmussen. After finally gaining 100 percent control over the giant Russian brewery Baltic Beverages Holding (BBH), and with the investments in Western China beginning to bear fruit, the newly appointed CEO was confident that the Danish brewing company’s intensified focus on emerging markets would pay off. The company was counting on tapping the massive potential in emerging markets in order to achieve...