Last active
July 10, 2019 23:52
-
-
Save TZubiri/929b015b5c3eddf2c2495fdfb457ce7b to your computer and use it in GitHub Desktop.
Desafíos incrementales para programar un ahorcado
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
#nivel 1 | |
def contiene_letra(aguja,pajar): | |
pass | |
assert( contiene_letra("o","avion") == True) | |
assert( contiene_letra("o","dinosaurio") == True) | |
assert( contiene_letra("g","dinosaurio") == False) | |
assert( contiene_letra("g","a") == False) | |
assert( contiene_letra("g","g") == True) | |
#nivel 2 | |
def posicion_de_letra(aguja,pajar): | |
pass | |
assert( posicion_de_letra("o","avion") == 4) | |
assert( posicion_de_letra("o","dinosaurio") == 4) | |
#Hay 2 o en este caso como lo solucionás! Podés usar una lista de numeros, pero todo debería devolver una lista | |
#nivel x | |
def posicion_de_letras(aguja,pajar): | |
pass | |
assert( posicion_de_letra("o","avion") == [4]) | |
assert( posicion_de_letra("o","dinosaurio") == [4,10]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment