Skip to content

Commit 2a5eab1

Browse files
authored
Update README.es.md
1 parent 5344d15 commit 2a5eab1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exercises/043-inheritance_and_polymorphism/README.es.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class HighSchoolStudent(Student): # Agrega la clase padre dentro de los parént
99
self.specialization = specialization
1010

1111
def study(self, hours):
12-
print(f"{self.name} is a high school student specializing in {self.specialization} and is studying for {hours} hours for exams.")
12+
return f"{self.name} is a high school student specializing in {self.specialization} and is studying for {hours} hours for exams."
1313

1414
# Creando una instancia de HighSchoolStudent
1515
high_school_student = HighSchoolStudent("John", 16, 85, "Science")
@@ -27,13 +27,13 @@ Además, tenemos la flexibilidad de agregar nuevos métodos exclusivamente para
2727

2828
2. Agrega un nuevo atributo llamado `major` para representar la carrera que están estudiando.
2929

30-
3. Modifica el método heredado `introduce` para imprimir este string:
30+
3. Modifica el método heredado `introduce` para retornar este string:
3131

3232
```py
3333
"Hi there! I'm <name>, a college student majoring in <major>."
3434
```
3535

36-
4. Agrega un nuevo método llamado `attend_lecture` que imprima el siguiente string:
36+
4. Agrega un nuevo método llamado `attend_lecture` que retorne el siguiente string:
3737

3838
```py
3939
"<name> is attending a lecture for <major> students."

0 commit comments

Comments
 (0)