Write a program that takes keeps taking characters

Assignment Help Python Programming
Reference no: EM133240744

Assignment - Need help with Python

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

Once the list is complete (i.e. x 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 indices. 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: x

Your list is ['a', 'b', 'c', 'd', 'e', 'x']

Which two indices do you want to exchange?

Index 1: 2

Index 2: 4

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

Reference no: EM133240744

Questions Cloud

Several objections to creation of market for organs : What is the central idea of this passage? The reading identifies several objections to the creation of a market for organs.
Explain primary reasons for a policy and procedure manual : Explain the primary reasons for a policy and procedure manual for facility/event management. Then describe the headings that should be included in a policy
Explain simple decision models and management science ideas : Explain simple decision models and management science ideas that provide powerful and qualitative insight about large spectrum of managerial problems
Dynamics of the non-disposable razor category : This case study assignment will reinforce concepts related to market segments, targeting, and positioning. In addition to these strategic components, the case w
Write a program that takes keeps taking characters : Write a program that takes keeps taking characters from the user till an 'x' is entered. Put each character in the list. Show the list
Globalization increases the gap : Contrast, differentiate, the pros and cons of the topic: globalization increases the gap between rich and poor countries.
Who are public to who the vw software engneers is obligated : Who are the public' to who the VW software engneers is obligated. Why the software engineers is obligated to protect the public
Discuss level of discretion public administrators : Discretion remains vital topic of debate in field of public administration. discuss level of discretion public administrators should have in decision making?
Do you think terri should have been kept alive or removed : Do you think Terri should have been kept alive or removed from life support? Who has the right to decide for her? Parents/ Husband

Reviews

Write a Review

Python Programming Questions & Answers

  Write program that creates an object of productionwork class

Write a program that creates an object of the ProductionWorker class and prompts the user to enter data for each of the object's data attributes.

  Reinforce topic material on simple functions

Select 3 sets of test data that will demonstrate the correct 'normal' operation of your program. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program.

  Compute second order differential equations for capacitor

Compute the 2nd order differential equations for capacitor voltage and inductor current in a series RLC circuit. Provide this derivation in your report.

  Define customer class in which a customer has a first name

Define Customer class. A customer has a first name, last name, and social security number. You must override __str__ operator to return the customer first name.

  Prompt the user to specify the number of servings

Prompt the user for the number of cups of lemon juice, water, and sugar needed to make lemonade. Prompt the user to specify the number of servings.

  Examine both function implementations

CISC 160 Lab Assignment - Examine both function implementations. Which of these functions is more efficient and why

  Write a main function that prompts the user for the values

CPSC 1301L-COMPUTER SCIENCE- Write a main function that prompts the user for the values of r and h, calls the six functions and prints the results.

  Prompts the user for the prices of five individual item

Program a simple program using Python that prompts the user for the prices of five individual items and then calculates and displays the subtotal, sales tax.

  Answer the output of the given lines of code

Without executing the given lines of code on your computer, answer the output of the lines that marked OUTPUT.

  Why was basic good in past and why have we moved to python

Why was BASIC good in the past? Why have we moved to Python? Feature-by-feature, how powerful is BASIC vs. Python?

  Write a program that fills two lists with input from the use

Write a program that fills two lists with input from the user. One list should be students' first names and the second list should be students' last names.

  Steganography method to send messages

Steganography method to send messages, you must implement two processes connected via sockets or a similar mechanism: a sender and a receiver

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd