import requests import time def print_cat_facts(): for number in range(100): url = f'https://catfact.ninja/fact' response = requests.get(url) cat_fact = response.json() print(cat_fact['fact']) if __name__ == '__main__': start_time = time.perf_counter() print_cat_facts() end_time = time.perf_counter() print(f'Total Time: {round(end_time - start_time, 5)} seconds.')