Fix formatting and improve greeting function in prueba.py

This commit is contained in:
Javier 2025-10-31 09:50:58 +01:00
parent 4e031680ba
commit ed481d9b15
2 changed files with 3 additions and 2 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -38,6 +38,7 @@ while contador < 3:
def saludar(nombre):
return f"Hola {nombre}!"
print(saludar("Mundo"))
@ -64,6 +65,6 @@ class Persona:
def saludar(self):
print(f"Soy {self.nombre} y tengo {self.edad} años.")
p1 = Persona("Javi", 22)
p1.saludar()