Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 10 - Lists - Section 10.11 - Sorting Lists - Check Point - MyProgrammingLab - Page 343: 10.25

Answer

In the line 8 change the > symbol in "lst[k] > currentElement" to < symbol like "lst[k] < currentElement".

Work Step by Step

We just need to change the comparison operator so that in the sublist, new element is inserted at correct position according to the descending order.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.