Anonymous user
Magic 8-ball: Difference between revisions
m
→{{header|Python}}
(Fixed shebang and ordering for CFEngine 8ball example) |
|||
Line 1,830:
question = input('Ask your question:')
if len(question) == 0: break
answer = random.choice(s)▼
if question in q_and_a:
print('Your question has already been answered')
else:
▲ answer = random.choice(s)
q_and_a[question] = answer
print(answer)</lang>
|