How do I set this up in EDLE python? what would be the correct answer Given the following list containing inner planet
Posted: Fri May 20, 2022 11:56 am
How do I set this up in EDLE python? what would be the
correct answer
Given the following list containing inner planet weights in kg,
select the choice which fills in the blank to provide a list slice
which extracts the weight from the list into a separate list named
"weights" to produce the output shown.
innerPlanetWeights = ['Mercury', 3.285e23,
'Mars', 6.39e23,
'Earth', 5.972e24]
weights = ____________________
print(weights)
Output:
[3.285e+23, 6.39e+23, 5.972e+24]
innerPlanetWeights[1::2]
innerPlanetWeights[0::2]
innerPlanetWeights[0:6]
innerPlanetWeights[0::3]
correct answer
Given the following list containing inner planet weights in kg,
select the choice which fills in the blank to provide a list slice
which extracts the weight from the list into a separate list named
"weights" to produce the output shown.
innerPlanetWeights = ['Mercury', 3.285e23,
'Mars', 6.39e23,
'Earth', 5.972e24]
weights = ____________________
print(weights)
Output:
[3.285e+23, 6.39e+23, 5.972e+24]
innerPlanetWeights[1::2]
innerPlanetWeights[0::2]
innerPlanetWeights[0:6]
innerPlanetWeights[0::3]