Write a python program that will take an input from the user which will be a combination of uppercase and lowercase letters. Now find out the ascii value of uppercase letters, if that ascii value is an even number, only insert those values to a list. Now find out the ascii value of lowercase letters, if that ascii value is an odd number, only insert those values to a list. Now, join these two lists, find out the characters of the ascii values, and if that character is a vowel, store them in another list and print that list.
Write a python program that will take an input from the user which will be a combination of uppercase and lowercase letters. Now find out the ascii value of uppercase letters, if that ascii value is an even number, only insert those values to a list. Now find out the ascii value of lowercase letters, if that ascii value is an odd number, only insert those values to a list. Now, join these two lists, find out the characters of the ascii values, and if that character is a vowel, store them in another list and print that list.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Write a python program that will take an input from the user which will be
a combination of uppercase and lowercase letters.
Now find out the ascii value of uppercase letters, if that ascii value is
an even number, only insert those values to a list.
Now find out the ascii value of lowercase letters, if that ascii value is
an odd number, only insert those values to a list.
Now, join these two lists, find out the characters of the ascii values, and
if that character is a vowel, store them in another list and print that
list.
================================================
Sample Input 1:
DumBlEdoRE
Sample Output 1:
Even ASCII value of the uppercase letters: [68, 66, 82]
Odd ASCII value of the lowercase letters: [117, 109, 111]
Joined list: [68, 66, 82, 117, 109, 111]
Vowels from the joined list: ['u', 'o']
Explanation 2:
Here, see, the uppercase letters are D, B, E,R,E, ascii values of these are
68,66,69,82 and 69. Among them even values are [68,66,82]. Accordingly, for
lowercase letters, odd values are [117, 109, 111]. After joining the lists,
the final list looks like this [68, 66, 82, 117, 109, 111]. Now, from this
list, the vowels are u and o. So, the output is ['u', 'o'].
================================================
Sample Input 2:
MCgoNagAlL
Sample Output 2:
Even ASCII value of the uppercase letters: [78, 76]
Odd ASCII value of the lowercase letters: [103, 111, 97, 103]
Joined list: [78, 76, 103, 111, 97, 103]
Vowels from the joined list: ['o', 'a']
Explanation2:
Here, see, the uppercase letters are M, C, N, A,L, ascii values of these
are 77, 67, 78, 65, 76. Among them even values are [78, 76]. Accordingly,
for lowercase letters, odd values are [103, 111, 97, 103]. After joining
the lists, the final list looks like this [78, 76, 103, 111, 97, 103]. Now,
from this list, the vowels are 'o' and 'a'. So, the output is ['o', 'a']
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education