Saltar para o conteúdo principal
🔒 Modo de pré-visualização. As primeiras quinze aulas de Foundations são grátis; esta é Pro. Inicie um trial de 7 dias para desbloquear o editor, as dicas AI e o resto do programa. Cartão necessário, cancele a qualquer momento no Dashboard.Iniciar trial de 7 dias →
⚡
← Cursos›Python FoundationsMódulo 6 · Simultaneidade e paralelismo›Noções básicas de threading – prever a saídapredict135 / 174
+100 XP
Tarefa🌐 shown in EN
📝 **Task:** Predict what the program prints.\n\nThe thread runs \`worker("A")\` to completion (\`join()\` waits), then the main thread continues. Output is deterministic because start+join serializes execution.\n\nExpected: two lines. 📋 Edit the starter code below. Tests run automatically. 💡 **Hint:** Re-read the theory if you get stuck.
Prevê a saída

Lê o código com atenção

import threading

def worker(name):
    print(name)

t = threading.Thread(target=worker, args=("A",))
t.start()
t.join()
print("done")

O que o programa vai imprimir? Escreve aqui: