Question: Create a Python program file called Ch 0 6 - 3 _ Name.py . ( Replace Name with your initial of first name and first

Create a Python program file called Ch06-3_Name.py.(Replace Name with your initial of first name and first 5 letters of last name. If your last name is shorter than 5 letters, just use full last name, it doesn't have to be 5 letters. i.e. if your name is John Doe, your file name should be Ch06-2_JDoe.py)
Ask user to provide a sentence and display following information from it.
First three characters of the input.Ask user which character to find an occurrences for and display that informationAsk user which string to replace and display resulted string. Also, if the string doesnt exist, display information about it.Make sure to match the output with the sample output provided, including line spacing and questions. If your program output doesn't match the sample output provided, points will be deducted (at least 10% up to 30% of the maximum possible points)Your program suppose not to trigger trace back error for any input.Ask user whether to repeat or stop and depends on the user's response, your program repeats or terminates. User will response either 'Y' or 'y' to repeat and 'N' or 'n' to stop. Do not compare both cases, convert the response so that your program doesn't need to compare both cases (i.e. compare to 'Y' and 'y').
Sample input and output===========================================
Please enter a sentence: This is a test
First three letters of the provided sentence is: Thi
Which character do you want to find an occurrences for? x
Character x doesn't exist in the provided sentence.
Please provide a string to replace and the replacement string:
String to be replaced: is
String to replace with: IS
New string with replacement is: ThIS IS a test
Do you want to repeat? (Y/N) Y
Please enter a sentence: This is a tset
First three letters of the provided sentence is: Thi
Which character do you want to find an occurrences for? i
There are 2 occurrences of i in the provided sentence.
Please provide a string to replace and the replacement string:
String to be replaced: abc
String to replace with: XXX
String abc doesn't exist in the input.
Do you want to repeat? (Y/N) y
Please enter a sentence: banana
First three letters of the provided sentence is: ban
Which character do you want to find an occurrences for? a
There are 3 occurrences of a in the provided sentence.
Please provide a string to replace and the replacement string:
String to be replaced: na
String to replace with: NA
New string with replacement is: baNANA
Do you want to repeat? (Y/N) n
Thank you for using the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!