Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that asks user to input an index first, then asks the user to enter words and constructs a list of characters in

Write a program that asks user to input an index first, then asks the user to enter words and constructs a list of characters in each word under the index. If a word does not have the character under the given index then it will be skipped. The program must work exactly like the following example.
For example:
Input Result
3
x
xy
xyz
xyzt
xyztw
abcdef
blah
Q
Enter an index: 3
Enter a word (or type Q to quit): x
Enter a word (or type Q to quit): xy
Enter a word (or type Q to quit): xyz
Enter a word (or type Q to quit): xyzt
Enter a word (or type Q to quit): xyztw
Enter a word (or type Q to quit): abcdef
Enter a word (or type Q to quit): blah
Enter a word (or type Q to quit): Q
List of characters:
['t','t','d','h']
4
frog
cat
dog
Q
Enter an index: 4
Enter a word (or type Q to quit): frog
Enter a word (or type Q to quit): cat
Enter a word (or type Q to quit): dog
Enter a word (or type Q to quit): Q
List of characters:
[]

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

gpt 1 1 9 . .

Answered: 1 week ago

Question

BPR always involves automation. Group of answer choices True False

Answered: 1 week ago