Skip to content

Instantly share code, notes, and snippets.

@dfenjves
Created April 15, 2020 20:53
Show Gist options
  • Save dfenjves/735ef080a99b26e5a9757111b59b6deb to your computer and use it in GitHub Desktop.
Save dfenjves/735ef080a99b26e5a9757111b59b6deb to your computer and use it in GitHub Desktop.
import requests
import random
response = requests.get('http://jservice.io/api/clues?category=139').json()
my_number = random.randint(0, 100)
answer = input(response[my_number]['question'])
if answer == response[my_number]['answer']:
print("Congrats! You got it!!!")
else:
print("Wrong answer")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment