Solution Exercise 18: python algorithm to test whether a given string contains a given character
Exercise 18 Write a Python program that asks the user to input a string, and then checks if the string contains the letter 'a'. If it does, the program returns…