The instructions for the coding test are as follows:"

Votee would like to conduct the coding test in a recorded live session. The idea is to connect to an API that plays a Wordle-like puzzle. You can find the API documentation at the following link: https://wordle.votee.dev:8000/redoc

Developers are allowed to use any frameworks, IDEs, chatbots, LLMs, or other resources to write their program and showcase their skill set. However, if you take references from other open-source projects or tutorials, please ensure that proper credit is given. Plagiarism will not be tolerated, and it may affect the evaluation of your application.

Your task is to write a program that automatically guesses random words against the API, using the following command as an example: curl -v ‘https://wordle.votee.dev:8000/random?guess=theft&seed=1234'"
If I run curl -v ‘https://wordle.votee.dev:8000/random?guess=theft&seed=1234 in the terminal, the output:
StatusCode        : 200
StatusDescription : OK
Content           : [{"slot":0,"guess":"t","result":"correct"},{"slot":1,"guess":"h","result":"correct"},{"slot":2,"guess":"e","result":"correct"}, 
                    {"slot":3,"guess":"f","result":"correct"},{"slot":4,"guess":"t","result":...
RawContent        : HTTP/1.1 200 OK
                    Content-Length: 211
                    Content-Type: application/json
                    Date: Sun, 26 May 2024 08:27:33 GMT
                    Server: uvicorn

                    [{"slot":0,"guess":"t","result":"correct"},{"slot":1,"guess":"h","result":...
Forms             : {}
Headers           : {[Content-Length, 211], [Content-Type, application/json], [Date, Sun, 26 May 2024 08:27:33 GMT], [Server, uvicorn]}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 211

My Python program that guess the words:
"
import requests
import json
import random
from collections import defaultdict

API_URL = "https://wordle.votee.dev:8000/random"

# Load a list of possible five-letter words - this can be any comprehensive list of valid words
with open("C:\\Users\\a\\Desktop\\wordle_guesses.txt", 'r') as file:
    all_words = file.read().splitlines()  # List of words


def get_feedback(guess, seed):
    response = requests.get(f"{API_URL}?guess={guess}&seed={seed}")
    return response.json()


def calculate_frequencies(words):
    frequencies = defaultdict(lambda: [0] * 5)

    for word in words:
        for i, letter in enumerate(word):
            frequencies[letter][i] += 1

    return frequencies


def score_word(word, frequencies):
    score = 0

    max_frequencies = {char: max(pos) for char, pos in frequencies.items()}

    for i, letter in enumerate(word):
        score += max_frequencies[letter] - frequencies[letter][i]

    return score


def get_best_guess(words, frequencies):
    scores = {word: score_word(word, frequencies) for word in words}
    return min(scores, key=scores.get)


def filter_words(words, feedback, guess):
    new_words = []

    for word in words:
        match = True
        for slot in feedback:
            letter = slot['guess']
            result = slot['result']
            slot_num = slot['slot']

            if (result == "correct" and word[slot_num] != letter) or \
                    (result == "present" and (word[slot_num] == letter or letter not in word)) or \
                    (result == "absent" and letter in word):
                match = False
                break

        if match:
            new_words.append(word)

    return new_words


def wordle_solver(seed):
    words = all_words.copy()
    guess_count = 0

    while words:
        frequencies = calculate_frequencies(words)
        best_guess = get_best_guess(words, frequencies)
        feedback = get_feedback(best_guess, seed)

        guess_count += 1
        print(f"Guess {guess_count}: {best_guess}")
        print(f"Feedback: {json.dumps(feedback)}")

        if all(slot['result'] == 'correct' for slot in feedback):
            print(f"Solved with guess: {best_guess}")
            return best_guess

        words = filter_words(words, feedback, best_guess)

    raise Exception("Couldn’t solve the wordle puzzle")


# Execution entry point
seed = random.randint(0,10000)  # Change this to the seed you need to use
try:
    wordle_solver(seed)
except Exception as e:
    print(e)
"
Can you add the code to test all the answers and calculate the mean guess number? The answer is from the api, no my wordlist.