Skip to content

Commit d5fdaff

Browse files
authored
Update app.py
1 parent 47e8438 commit d5fdaff

File tree

1 file changed

+2
-3
lines changed
  • exercises/043-inheritance_and_polymorphism

1 file changed

+2
-3
lines changed

exercises/043-inheritance_and_polymorphism/app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ def __init__(self, name, age, grade):
77
self.grade = grade
88

99
def introduce(self):
10-
print(f"Hello! I am {self.name}, I am {self.age} years old, and my current grade is {self.grade}.")
10+
return f"Hello! I am {self.name}, I am {self.age} years old, and my current grade is {self.grade}."
1111

1212
def study(self, hours):
13-
print(f"{self.name} is studying for {hours} hours.")
13+
return f"{self.name} is studying for {hours} hours."
1414

1515
### DON'T modify the code above ###
1616

1717
### ↓ Your code here ↓ ###
18-

0 commit comments

Comments
 (0)