Question: code in python please 3. (3 pts) Let lots be a list-of-test-scores, the data definition created in Assignment 1. Write a routine using a for

 code in python please 3. (3 pts) Let lots be a

code in python please

3. (3 pts) Let lots be a list-of-test-scores, the data definition created in Assignment 1. Write a routine using a for loop that checks if lots is ordered from the lowest score to the highest score by comparing successive pairs of test scores. If the list is ordered, the routine should return the boolean value True. If it is un-ordered, the routine should return the boolean value False. Hint: You'll need to use an if...else statement embedded in a for loop to test for the appropriate condition. You will also need to recall how to concatenate boolean values. Check your routine by evaluating the order of 1 (a) alots1 = [72, 89, 90, 95, 85). Your routine should evaluate to False. (b) alots2 = [72, 85, 89, 90,95). Your routine should evaluate to True. 4. Let lofs be a list-of-final-scores. Write two routines using for loops and if...else statements that evaluate the letter grade of each final score in lofs according to the following grading scheme: Letter Grade Range 190, 100) [80, 90) [70, 80) [60, 70) below 60 (2 pts) The first routine should return a new list consisting of final grades, defined in Assignment 1. Each final grade in the list is determined by matching each final score in the list to grading scheme above. (2 pts) The second routine should use list mutability to substitute the corresponding letter from for each final score in the original list. Use lofs = [66, 72, 93, 89, 50, 67, 99,85] to test your routine. The return value should be ('D', 'C', 'A', 'B', 'F', 'D', 'A', 'B']

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!