Space Python Loading Python…

Nested Dictionaries

 
0:00 / 0:00

Challenge

Practise what this example shows with these challenges.

Nested response

Write the codeEasy 2 stages

Print the rocket's name and the first mission patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.

Start the challenge

Manifest validator

Write the codeMedium 2 stages

Write problems(item), which lists everything wrong with one cargo item: missing fields, a mass that isn't a number, is 0 or is over the limit. Print a pass or fail line per item, then catch duplicate IDs and check the total load.

Start the challenge

Discussion

Stuck on this example or want to go further? Ask here, or see what others asked.

Log in to ask and reply.

script.py
PythonLn 1, Col 1Spaces: 4
Loading the Python environment…

Separate arguments with commas. They're passed on every Run as sys.argv[1:].