Created
February 19, 2022 14:43
Star
You must be signed in to star a gist
Dobbelspel voor CoderDojo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
# Gooi de dobbelsteen | |
answer = randint(1, 6) | |
while True: | |
guess = int(input('Raad een getal tussen 1 en 6: ')) | |
if guess == answer: | |
print("Dat was het juiste antwoord!") | |
break | |
else: | |
print("Helaas, dat was niet het juiste antwoord.") | |
print("Bedankt voor het spelen") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment