Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Database And Knowledge Base Systems

Authors: S Krishna

1st Edition

9810206208, 978-9810206208

More Books

Students also viewed these Databases questions

Question

Describe Balor method and give the chemical reaction.

Answered: 1 week ago

Question

How to prepare washing soda from common salt?

Answered: 1 week ago

Question

describe the main employment rights as stated in the law

Answered: 1 week ago