[Solved] Robert is given a string that ends with a character or a number
Robert is given a string that ends with a character or a number. He has to check the length of the given string and append it to the end in such a way that if the original string ends with…