Question
2. Write a function that takes a single list of characters as an argument and returns a new list of integers as a return value.
2. 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). (plz use python3)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started