Question: PYTHON 3 please modify this code follow the directions thank you Python 3 Modify this code and follow directions thank you In class, we wrote
PYTHON 3 please modify this code follow the directions thank you
Python 3 Modify this code and follow directions thank you
In class, we wrote code to add values to a linked list and print it out. That code appears below Add one function to this code to find the maximum value in the list. You can assume the list is not empty. Then call that function to find the maximum, and then print it out. (3 points) import random class Node: def init self,val): self . val = val self.next- None def print list(values): n values while nNone: print(n.val) n = n.next valuesNone for i in range (10): num - random.randint(0,100) val- Node (num) val.next- values valuesval print_list(values)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
