Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ask the user to input a line of text, and a character ch. The python program should: Create a string variable that contains the text

Ask the user to input a line of text, and a character ch.

The python program should: Create a string variable that contains the text after removing all occurrences of the character ch from the input text. Print that string.

For example, the result would look like: Please enter a line of text: The quick brown fox jumped over the lazy dog Please enter the character you want to remove: o The quick brwn fx jumped ver the lazy dg

Your program should check to make sure that the user only entered one character for the second input. If they enter more than one character, they should be made to enter the character again. For example: Please enter a line of text: The quick brown fox jumped over the lazy dog Please enter the character you want to remove: the Please enter the character you want to remove: o The quick brwn fx jumped ver the lazy dg

Lastly, your program should be case insensitive. For example: Please enter a line of text: The quick brown fox jumped over the lazy dog Please enter the character you want to remove: t he quick brown fox jumped over he lazy dog

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

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

=+8.8. Suppose that S = (0,1,2 ,... ], Poo =1, and f,o>0 for all i.

Answered: 1 week ago