Question: Write a python function that determines whether or not a list of values is in sorted order ( either ascending or descending ) . The

Write a python function that determines whether or not a list of values is in sorted order (either ascending or descending). The function should print "Sorted" if the list is already sorted.Otherwise, it should print "Not Sorted". (20 pt.)ExampleListlist1=[4,5,7,19,12]list2=[2,6,9,20]list =[21,12,9,7]list4=[19,15,13,17]Screen OutputNot SortedSortedSortedNot Sorted

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!