Eliza is a famous 1966 computer program written by Joseph Weizenbaum. It imitates a psychologist (more specifically, a Rogerian therapist) by rephrasing many of a patient's statements as questions and posing them to the patient. This type of therapy (sometimes called nondirectional) is often parodied in movies and television shows, in which the therapist does statement to statement. For example, when the patient says, "Tell me more about your brother". If the patient says, "I dislike school," the therapist might say, "Why do you say you dislike school?" Eliza became a milestone in the history of computers because it was the first time a computer programmer attempted to create the illusion of human-to-human interaction.
Create a simple version of Eliza by allowing the user to enter statements continually until the user quits by typing "Goodbye". After each statement, have the computer make one of the following responses:

If the user entered the word "my" (for example, "I am having trouble with my brother"), respond with "Tell me more about your" and insert the noun in question - for example, "Tell me more about your brother".
If the user entered a strong word, such as "love", or "hate", respond with, "You seem to have strong feelings about that".
Add a few other appropriate responses of your choosing.
In the absence of any of the preceding inputs, respond with a random phrase from the following: "Please go on", "Tell me more", or "Continue"

hey guys, i don't know how to insert the noun. can you please help me out on this. thanks

Could you show us what you have so far, or at least the part where you check for the substring " my "? Generally speaking, you want to simply take the tokens or words following "my", whatever they happen to be.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.