← Back to Files
Question 417
Round Trip Through JSON
Round Trip Through JSON
The write step builds person from the two input lines (a name, then an age) and saves it to person.json with json.dump and indent=2. Open the file for reading, load it back with json.load into loaded and print <name> is <age> using the values from loaded, not from the original dict. Input: two lines, no prompt. Import only json.
Expected Output:
Maya is 19= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
FilesJSON
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.