from flask import Blueprint, jsonify  # jsonify creates an endpoint response object
from flask_restful import Api, Resource # used for REST API building
import requests  # used for testing

url = "https://opentdb.com/api.php?amount=10&category=19&difficulty=medium&type=multiple"
response = requests.request("GET", url)
quiz_data = response

print(quiz_data.text)
{"response_code":0,"results":[{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"In the hexadecimal system, what number comes after 9?","correct_answer":"The Letter A","incorrect_answers":["10","The Number 0","16"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"How many zeros are there in a googol?","correct_answer":"100","incorrect_answers":["10","1,000","1,000,000"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"What is the area of a circle with a diameter of 20 inches if π= 3.1415?","correct_answer":"314.15 Inches","incorrect_answers":["380.1215 Inches","3141.5 Inches","1256.6 Inches"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"What are the first 6 digits of the number "Pi"?","correct_answer":"3.14159","incorrect_answers":["3.14169","3.12423","3.25812"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"What is the alphanumeric representation of the imaginary number?","correct_answer":"i","incorrect_answers":["e","n","x"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"To the nearest whole number, how many radians are in a whole circle?","correct_answer":"6","incorrect_answers":["3","4","5"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"What Greek letter is used to signify summation?","correct_answer":"Sigma","incorrect_answers":["Delta","Alpha","Omega"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"Which of the following dice is not a platonic solid?","correct_answer":"10-sided die","incorrect_answers":["12-sided die","20-sided die","8-sided die"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"Which mathematician refused the Fields Medal?","correct_answer":"Grigori Perelman","incorrect_answers":["Andrew Wiles","Terence Tao","Edward Witten"]},{"category":"Science: Mathematics","type":"multiple","difficulty":"medium","question":"In the complex plane, multiplying a given function by i rotates it anti-clockwise by how many degrees?","correct_answer":"90","incorrect_answers":["180","270","0"]}]}
results = quiz_data.json().get('results')

def IndividualQuestion(a):
    a = results
    count = 0
    for i in a:
        q = results[count]
        count += 1
        print(q['question'])

IndividualQuestion(results)
In the hexadecimal system, what number comes after 9?
How many zeros are there in a googol?
What is the area of a circle with a diameter of 20 inches if π= 3.1415?
What are the first 6 digits of the number "Pi"?
What is the alphanumeric representation of the imaginary number?
To the nearest whole number, how many radians are in a whole circle?
What Greek letter is used to signify summation?
Which of the following dice is not a platonic solid?
Which mathematician refused the Fields Medal?
In the complex plane, multiplying a given function by i rotates it anti-clockwise by how many degrees?