Created
April 15, 2020 20:53
-
-
Save dfenjves/735ef080a99b26e5a9757111b59b6deb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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