Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window.
Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page.
Oefening - Galgje
Sign in to test your solution.
import random
# Dit stukje code leest een willekeurig woord van 8 tekens in
# Dit is een stukje voor de "Sandbox"
import urllib3
target_url = "https://tinyurl.com/2dfecxkz"
http = urllib3.PoolManager()
response = http.request('GET', target_url)
woorden = response.data.decode('utf-8').split("\n")
woord = random.choice(woorden)
# Dit is een stukje voor het indienen in Dodona
#woorden = open('words.txt').read().split("\n")
#woord = random.choice(woorden)
# Hieronder komt je de rest van je programma
tekens = "????????" # Gebruik deze variabele