Question: 2. Using Python3, write a function that takes a single list of characters as an argument and returns a new list of integers as a

2. Using Python3, write a function that takes a single list of characters as an argument and returns a new list of integers as a return value. The list returned must contain the ASCII codes of every uppercase character in the original list in the reverse order from the order they appeared in the original list. You are not permitted to use negative indexing (i.e., the numbers you write in the square brackets to retrieve a value from the list must be nonnegative), and you are not permitted to use any functions other than append, len, and ord. As a clarifying example, if your function was called with the argument ['H', 'e', 'l', 'L', 'o', 'W', 'o', 'r', 'l', 'D'] it must return the list [68, 87, 76, 72] (because the ASCII codes for 'D', 'W', 'L', 'H' are 68, 87, 76, 72, respectively)

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!