Skip to content

Commit

Permalink
one more try
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarer committed Mar 26, 2024
1 parent e92ec2f commit df3b7ff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 33 deletions.
2 changes: 1 addition & 1 deletion _sources/web/person.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
],
"children": [],
"spouse": null
}
}
24 changes: 0 additions & 24 deletions _sources/web/person2.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
],
"children": [],
"spouse": null
}
}
14 changes: 7 additions & 7 deletions _sources/web/writeCode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,16 @@ and email address.
fh.close()
person_list = json.loads(data)

The file ``person2.json`` below contains JSON data for a person in a dictionary including their first name,
The file ``person3.json`` below contains JSON data for a person in a dictionary including their first name,
last name, address, and phone numbers.

.. reveal:: person2_data_rev
.. reveal:: person3_data_rev
:showtitle: Show
:hidetitle: Hide

.. raw:: html

<pre id="person2.json.">
<pre id="person3.json.">
{
"firstName": "John",
"lastName": "Smith",
Expand Down Expand Up @@ -281,16 +281,16 @@ last name, address, and phone numbers.
"spouse": null
}

.. datafile:: person2.json
:fromfile: person2.json
.. datafile:: person3.json
:fromfile: person3.json
:hide:

.. activecode:: web_email_person_write_v2
:language: python3
:nocodelens:
:datafile: person2.json
:datafile: person3.json

Finish the code below so that it prints the first name, last name, the
state the person lives in, and their mobile phone number from the JSON loaded from person2.json.
state the person lives in, and their mobile phone number from the JSON loaded from ``person3.json``.
~~~~
import json
Binary file added _sources/web/~$books.xml
Binary file not shown.

0 comments on commit df3b7ff

Please sign in to comment.