Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def eightBall():
- ans = ["It is certain.",
- "It is decidedly so.",
- "Yes, definitely.",
- "Reply hazy, try again.",
- "Ask again later.",
- "Concentrate and ask again.",
- "My reply is no.",
- "Outlook not so good.",
- "Very doubtful."]
- print ("Ask me a question and I shall give you an answer.")
- q = input()
- if "?" not in q:
- print ("That wasn't a question.")
- eightBall()
- else:
- print (random.choice(ans))
- if random.choice(ans) == "Reply hazy, try again." or random.choice(ans) == "Ask again later." or random.choice(ans) == "Concentrate and ask again.":
- eightBall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement