The dog chases the cat to the kitchen. John gave an apple to Mary. A student reads Shakespeare in the bathroom.
Each sentence consists of a noun phrase ("The" or "A" or no article + one noun), a verb, another noun phrase ("the" or "a" or no article + one noun), a prepositional phrase and a period (".").
Your script breaks the three sentences into four parts (noun phrase, verb, noun phrase, prepositional phrase) and then randomly assembles one sentence. Examples of such a sentence are ("John chases the cat to the kitchen.", "The dog reads apple to the kitchen.")
Your script prints one randomly assembled sentence at a time to the screen (in one line) then asks the user whether he/she wants to see another sentence. If the answer is "yes" the script continues, if "no", it stops.
Note: Use the random module: "import random". A random number between 0 and 2 can be obtained by the following statement: "random.randrange(0,3,1)". The first number (0) represents the start of the range; the second number (3) is one larger than the end of the range; the third number (1) is always 1 when dealing with integers.
The computer first prints a random greeting message out of 3 possible greeting messages. The user replies. Then the computer prints a random how-are-you message out of three possible messages. The user replies.
Then a loop starts which only finishes if the user types "bye".
In this loop the computer checks whether the last character of the user's input was a question mark or not. In case of a question mark, the computer types an answer such as "I don't know.", "That is a stupid question.", "I will not answer that question.", etc. Then the computer asks a question that starts a new topic, such as "How is your family?", "Where are you right now?", etc.
In case the last character of the user's input was not a question mark, the computer prints a meaningless comment, such as "Sure.", "Cool!", "Very interesting." and then asks the user to restate his/her comment, such as "Why are you saying that?", "Can you explain that?", "Why do you think that?", etc.
In each case the answer and question should be separately and randomly selected from 5 choices.
For usability issues: you should print some kind of prompt (eg "... ") when you expect user input.