Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Geany Write a program that takes keeps taking characters from the user till an q is entered. Put each character in the list. Show

Python Geany

Write a program that takes keeps taking characters from the user till an q is entered. Put each character in the list. Show the list.

Once the list is complete (i.e. q is entered in the list), tell the user how many members are in the list. Then ask the user if they want to swap any two index locations. Take the index positions as input from the user, swap the elements, show the list, and that ends the program.

Sample Output:

Please enter a character in the list: a

Please enter a character in the list: b

Please enter a character in the list: c

Please enter a character in the list: d

Please enter a character in the list: e

Please enter a character in the list: q

Your list is [a, b, c, d, e, q]

Which two indices do you want to exchange?

Index 1: 2

Index 2: 4

Your new list is [a, b, e, d, c, q]

Good Bye.

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

Building The Data Warehouse

Authors: W. H. Inmon

4th Edition

0764599445, 978-0764599446

More Books

Students also viewed these Databases questions

Question

7 What evidence of mediation do you see from your tasks?

Answered: 1 week ago

Question

Prepare an ID card of the continent Antarctica?

Answered: 1 week ago

Question

What do you understand by Mendeleev's periodic table

Answered: 1 week ago