Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import the random module
- import random
- # Define a list of responses
- responses = [
- "I'm sorry, I cannot answer that.",
- "I think that is a very good question.",
- "I'm not sure, but I'll try to find out.",
- "That is a difficult question. Let me think about it.",
- "I don't know the answer to that. Can you please provide more information?",
- "I'm sorry, but I am not programmed to provide that information.",
- "I'm not sure, but I'll try my best to help you.",
- "I'm sorry, but I am not capable of answering that question.",
- ]
- # Game loop
- while True:
- # Get the player's question
- question = input("Ask Jeeves: ")
- # Choose a random response from the list
- response = random.choice(responses)
- # Print the response
- print("Jeeves: {}".format(response))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement