Question: weight = { pencil: 1 0 , pen: 2 0 , paper: 4 , eraser: 8 0 } #TODO: Initialise weight with correct values available

weight ={
"pencil": 10,
"pen": 20,
"paper": 4,
"eraser": 80
} #TODO: Initialise weight with correct values
available ={
"pen": 3,
"pencil": 5,
"eraser": 2,
"paper": 10
} # TODO: Initialise available with correct values
overall_weight =0
for items in available:
for items in weight:
items_weight = weight[items]* available[items]
overall_weight =+ items_weight
# TODO: Loop through all available items to determine their overall weight
print("Overall weight:", overall_weight)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!