123question: #import json to load json data import json # import…

Question Answered step-by-step 123question: #import json to load json data import json # import…  123question:Image transcription text4. Write a Python program to reverse a string. Don’tuse str.reverse(), implement your own reversefunction Sample run: Call: string_rever… Show more… Show moreImage transcription text1. Leap year program in Python. Write apython program to check Year whetheris it a leap year or not. 2. … Show more… Show moreImage transcription textQ.1 Write a python program to printFibonacci series: 0, 1, 1, 2, 3, 5, 8, 13, 21,34, … 0+1-1, 1+1=2, 2+1=3, … Show more… Show more#import json to load json dataimport json# import collections for namedtuplefrom collections import namedtuple# Instalise json datadata = ‘{“name”: “John”,”town”: {“name”:”New york”,”id”:123}}’#Parse json into an object with attributes corresponding into dictionary keysx = json.loads(data,object_hook=lambda d:namedtuple(‘X’,d.keys())(*d.values()))# Display the outputprint(x.name,x.town.name,x.town.id) Image transcription text[5] 1 #import json to load json data 2import json 3 # import collections fornamedtuple 4 from collect… Show more… Show moreImage transcription textJohn Horton Conway, a mathematician who workedat Princeton University, died of COVID-lQ in April2020 at the age of 82. In addition to i… Show more… Show more    Computer Science Engineering & Technology Software engineering CSCI MISC Share QuestionEmailCopy link Comments (0)

Leave a Comment

Your email address will not be published. Required fields are marked *