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 d5fdaff

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

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