Question: # Step 1 : Input 4 weights and store them in a list weights = [ ] for i in range ( 4 ) :
# Step : Input weights and store them in a list weights for i in range: weight floatinputfEnter weight i : weights.appendweight # Output the list of weights printfWeights: weights # Step : Calculate and output the average weight with two decimal places averageweight sumweights lenweights printfAverage weight: averageweight:f # Step : Output the maximum weight with two decimal places maxweight maxweights printfMax weight: maxweight:f # Step : Prompt user for a list location and output the weight in pounds and kilograms location intinputEnter a list location : pounds weightslocation # Convert user input to zerobased index kilograms pounds printfWeight in pounds: pounds:f printfWeight in kilograms: kilograms:f # Step : Sort the list and output it weights.sort printfSorted list: weights
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
