Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedPython 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions