Question: weight = { pencil: 1 0 , pen: 2 0 , paper: 4 , eraser: 8 0 } #TODO: Initialise weight with correct values available
weight
"pencil":
"pen":
"paper":
"eraser":
#TODO: Initialise weight with correct values
available
"pen":
"pencil":
"eraser":
"paper":
# TODO: Initialise available with correct values
overallweight
for items in available:
for items in weight:
itemsweight weightitems availableitems
overallweight itemsweight
# TODO: Loop through all available items to determine their overall weight
printOverall weight:", overallweight
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
