Question: Modify your program so that instead of printing the entire dictionary, response, it only prints the following, each on a separate line: user, operation type,

Modify your program so that instead of printing the entire dictionary, response, it only prints the following, each on a separate line: user, operation type, start date, start time

User name: instructor@.com Operation: stop Starting date: 2019-05-26 Starting time: 13:12:36.826-07:00

Since response is a dictionary, you access the elements like response['user']. Take a screenshot of the output of your program.

from pprint import pprint from googleapiclient import discovery from oauth2client.client import GoogleCredentials credentials = GoogleCredentials.get_application_default() service = discovery.build('compute', 'v1', credentials=credentials) # Project ID for this request. project = 'my-project' # TODO: Update placeholder value. # The name of the zone for this request. zone = 'my-zone' # TODO: Update placeholder value. # Name of the instance resource to stop. instance = 'my-instance' # TODO: Update placeholder value. request = service.instances().stop(project=project, zone=zone, instance=instance) response = request.execute() # TODO: Change code below to process the `response` dict: pprint(response)

I am not sure how to modify this above program using the instructions at the top of the page.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!