Skip to content

Instantly share code, notes, and snippets.

@LarryWachira
Last active October 28, 2019 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarryWachira/130fd9ba8f07e66238043be7c331d2b3 to your computer and use it in GitHub Desktop.
Save LarryWachira/130fd9ba8f07e66238043be7c331d2b3 to your computer and use it in GitHub Desktop.
A `command line application` that uses a public API that reports data on the number of people in space. One of my first lines of Python.
if answer == 'Y' or answer == 'y':
print("Well, what are you waiting for? Guess how many humans are in space right now:\n> ")
answer = input()
if answer == info["number"]:
print("Of course. Google, right? \n\n:( ")
else:
print("Wrong! There are {} people in space right now.".format(info["number"]))
print("\n That'll be one billion dollars. I'll take cash.")
elif answer == 'N' or answer == 'n':
print("You must be a lot of fun at parties. \n\n:")
else: print("Seriously?")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment