15.11. Write Code QuestionsΒΆ

Click on the button below to see the contents of books.xml. It contains xml tags to define the books in a bookstore.

Fix the errors in the code below so that it reads the data from books.xml and finds all of the book data and prints the title for each book and then finds all the author names for each book and prints each author name.

Click on the button below to see the contents of news.xml. It contains xml tags to define news stories.

Fix the errors in the code below so that it reads the data from news.xml and prints the headline and date.

Click on the button below to see the contents of weather.xml. It contains xml tags to define weather observations.

Finish the code below so that it reads the data from weather.xml into a tree and then prints the location, temp_f, and windchill_f for the current_observation.

The file email.json below contains JSON data for people including their first_name, last_name and email address.

Finish the code below so that it prints the first name, last name and email address for each person in the list of dictionaries returned from json.loads(data).

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

Finish the code below so that it prints the first name, last name, the state the person lives in, and their mobile phone number.

You have attempted of activities on this page