Przejdź do treści głównej
🔒 Tryb podglądu. Pierwszych piętnaście lekcji Foundations jest darmowych; ta jest Pro. Rozpocznij 7-dniowy trial, aby odblokować edytor, podpowiedzi AI i resztę kursu. Wymagana karta, anulujesz w dowolnym momencie w Dashboard.Rozpocznij 7-dniowy trial →
⚡
← Kursy›Python FoundationsModuł 6 · Współbieżność i równoległość›Podstawy wątków — przewidywanie wynikówpredict135 / 174
+100 XP
Zadanie🌐 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.
Przewiduj wynik

Przeczytaj kod uważnie

import threading

def worker(name):
    print(name)

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

Co wypisze program? Napisz tutaj: