Skip to content

Instantly share code, notes, and snippets.

@topherPedersen
Last active August 29, 2018 21:11
Show Gist options
  • Select an option

  • Save topherPedersen/0052cc1a037b3473b7bd7d01bc0225d3 to your computer and use it in GitHub Desktop.

Select an option

Save topherPedersen/0052cc1a037b3473b7bd7d01bc0225d3 to your computer and use it in GitHub Desktop.
Super Simple Magic 8 Ball
# Super Simple Magic 8 Ball
# https://bit.ly/2LGEDnh
# Greet User
print("Welcome to Magic 8 Ball!")
# Prompt User to Ask a Question
question = raw_input("What is your question?")
# Generate Random Number
import random
randomNumber = random.randint(0, 1)
# Answer Users Question
if randomNumber == 1:
print("Yes, definitely.")
else:
print("Very doubtful.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment