-
-
Save parzibyte/ee2b94de422e8c4440bc5bd931bec78b to your computer and use it in GitHub Desktop.
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
def descubrirLetra(letraDeUsuario): | |
global palabraAdivinada | |
global letrasEscritas | |
global intentos | |
letraDeUsuario = letraDeUsuario.lower() | |
if letraDeUsuario in letrasEscritas: | |
return | |
else: | |
letrasEscritas.append(letraDeUsuario) | |
if not letraEstaEnPalabra(letraDeUsuario): | |
intentos -= 1 | |
else: | |
for letraCompuesta in palabraAdivinada: | |
if letraCompuesta["letra"] == letraDeUsuario: | |
letraCompuesta["adivinada"] = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment