Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# Python Programming Assignment No. 7 - Problem 2 # Answer each of the questions below within the code as comments # Answer each of
# Python Programming Assignment No. 7 - Problem 2
# Answer each of the questions below within the code as comments
# Answer each of the questions below within the code as comments # Question No. 1-What does the request library do? import urllib.request # Question No. 2 -What does the JSON library do? import json def readIdeaJamData() # Question No. 3 - Place the URL below into your web browser. what do you see? url "http://ideajam.net/ideajam/p/ij.nsf/jsonGetwhatsHot" # Question No. 4- Now go to this URL >> https://codebeautify.org/jsonviewer # Click on "Load URL" and paste in the URL from Question No. 3 What do you see? print("Reading website data...") # Question No. 5 -What does the statement below do? response = ur111b.request.urlopen(ur1) data = response. read() data = data.decode("UTF-8") data = json. loads ( str(data)) print( "Converting JSON to Python object...") print("Displaying data...") # Question No. 6 -What is being iterated through here? for i in datal 'result']: print("Created By:",il'createdby']) print ( " Idea: " , iidea" ] ) print( " IdeaSpace:" ,! 'ideaspace' ] ) print("Tag(s):", end-"") # Question No. 7 -What is being iterated through here? for j in il'tags'1: ") 'body' ] ) print(),end= " print( "Body: " , print( "URL:" ' iideaur1' ] ) print ( "Votes: " , 1votes" ] ) print( "Status : " , istatus' ] ) print( "Linked Idea(s):", end="") for j in ilinkedideald']; print (),end=" ") print ("Additional Long Text.",'additional!ongtext']) print ("Data Created :", "datecreated']) print("Implementation Manager:",il'implementationManager) print( "Implementation Plan:",iimplementationPlan']) print("n" print( "Comments:" for j in il'comments']: print (j[ 'createdby'1) print (jcomment' ] ) print (jdatecreated' ] ) print("n" print("n") print("Program Complete") readIdeaJamData() # Answer each of the questions below within the code as comments # Question No. 1-What does the request library do? import urllib.request # Question No. 2 -What does the JSON library do? import json def readIdeaJamData() # Question No. 3 - Place the URL below into your web browser. what do you see? url "http://ideajam.net/ideajam/p/ij.nsf/jsonGetwhatsHot" # Question No. 4- Now go to this URL >> https://codebeautify.org/jsonviewer # Click on "Load URL" and paste in the URL from Question No. 3 What do you see? print("Reading website data...") # Question No. 5 -What does the statement below do? response = ur111b.request.urlopen(ur1) data = response. read() data = data.decode("UTF-8") data = json. loads ( str(data)) print( "Converting JSON to Python object...") print("Displaying data...") # Question No. 6 -What is being iterated through here? for i in datal 'result']: print("Created By:",il'createdby']) print ( " Idea: " , iidea" ] ) print( " IdeaSpace:" ,! 'ideaspace' ] ) print("Tag(s):", end-"") # Question No. 7 -What is being iterated through here? for j in il'tags'1: ") 'body' ] ) print(),end= " print( "Body: " , print( "URL:" ' iideaur1' ] ) print ( "Votes: " , 1votes" ] ) print( "Status : " , istatus' ] ) print( "Linked Idea(s):", end="") for j in ilinkedideald']; print (),end=" ") print ("Additional Long Text.",'additional!ongtext']) print ("Data Created :", "datecreated']) print("Implementation Manager:",il'implementationManager) print( "Implementation Plan:",iimplementationPlan']) print("n" print( "Comments:" for j in il'comments']: print (j[ 'createdby'1) print (jcomment' ] ) print (jdatecreated' ] ) print("n" print("n") print("Program Complete") readIdeaJamData()Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started