Question: Write a program which, given a three word phrase (each word separated by a single space) such as: phrase = Nobody is perfect firstly converts

Write a program which, given a three word phrase (each word separated by a single space) such as: phrase = "Nobody is perfect" firstly converts the phrase into lowercase characters. Then the program separates the three individual words and replaces each internal letter of each word by a "." character keeping only the first and the last letters of each original word. The phrase is then reconstructed with 2 spaces between each of the three modified words. The program prints 3 lines of output: . a line of "*" characters. The number of stars is the length of the reconstructed phrase plus 6, the reconstructed phrase preceded by "** " and followed by a line of "*" characters. The number of stars is the length of the reconstructed phrase plus 6. II ***11 1 Note: You can assume that the phrase variable has been assigned a three word string and that each of the three words contains at least two characters. For example: Test Result phrase = "Nobody is perfect" ****** ************ ** n__y is p__t ** ************************* phrase = "Never stop dreaming" *************************** ** n_rs_P d *************************** Lg **
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
