Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2a5eab1

Browse files
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+
returnf"{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)

AltStyle によって変換されたページ (->オリジナル) /