Question: I'm having organization and syntax issues with this online homework problem. I was playing around with for loops and tried to use value(), item(), and
I'm having organization and syntax issues with this online homework problem. I was playing around with for loops and tried to use value(), item(), and keys() in dictionaries.
I'm adding a sample problem that the online book gives because the testers in the online book expects the student answers to be written similarly:
Here's the actual problem:
Figure 11.3.2: Use list0 to convert view objects into lists solar_distances-dict(mars-219.7e6, list-of-distances venus-116.4e6, jupiter-546e6, # pluto-2.95e9) to | list( solar-distances .values()) convert view list closest -sorted (list_of_distances) [0] next_closest sorted (list_of_distances) [1] Closest planet is 1.1640e+08 Second closest planet is 2.1970e+08 print( "Closest planet print ('Second closest is %,4e' % closest) planet is %.4e , % next-closest) Feedback
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
