-
-
Save parzibyte/77ced107b97c1a5c546872c38dba0139 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 main(): | |
nombre = input("Ingresa el nombre de tu Tamagotchi: ") | |
tamagotchi = Tamagotchi(nombre) | |
while not tamagotchi.muere(): | |
tamagotchi.imprimir_estado() | |
eleccion = "" | |
while not eleccion in ["1", "2", "3"]: | |
eleccion = input(""" | |
1. Alimentar | |
2. Jugar | |
3. Nada | |
Elige: """) | |
if eleccion == "1": | |
tamagotchi.evento("alimentar") | |
elif eleccion == "2": | |
tamagotchi.evento("jugar") | |
elif eleccion == "3": | |
tamagotchi.evento("") | |
print(tamagotchi.nombre + " ha muerto") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment