Question: Need help with python. Add a get min, max, and average to this program. class Node: -def init (self,init data)t #initialization data has inital data
class Node: -def init (self,init data)t #initialization data has inital data and next has none self.data-init data self.next-None -def get data(self): return self.data def get next(self): ext is a variable return self.next #set ting new data like 5 to 7(next in list) -def set data(self,new data) self.data-new data #link to new next fron previous none def set next (self,new next) self.nextenew_next creating the node with 93 and print the get data neweliode(93) print(new.get data) linked 1ist class -class Linkedlist: def init (self) self.head-None -def add(self,item)s teep-Node(item) teep.set,next (self.head self head temp -def size(se1) current-self.head count- while current !- None count-count 1 current-current.get next() retura count yList-Linkedlist) yist.addca
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
