Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started