Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 20, 2020 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/77ced107b97c1a5c546872c38dba0139 to your computer and use it in GitHub Desktop.
Save parzibyte/77ced107b97c1a5c546872c38dba0139 to your computer and use it in GitHub Desktop.
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