-
Notifications
You must be signed in to change notification settings - Fork 159
Añadir ejercicio 042-understanding_classes #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Añadir ejercicio 042-understanding_classes #61
Conversation
|
||
student1 = Student("Ana", 20, 80) | ||
|
||
student1.introduce() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agregar print(student1.introduce())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
student1 = Student("Ana", 20, 80) | ||
|
||
student1.introduce() | ||
student1.study(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agregar print(student1.study(3))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
def study(self, hours): # Esto es otro método | ||
print(f"{self.name} is studying for {hours} hours.") | ||
self.grade += hours * 0.5 | ||
print(f"After studying, {self.name}'s new grade is {self.grade}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quita todos los print, y reemplazalo por un unico return que retorne:
return f"After studying for {hours} hours, {self.name}'s new grade is {self.grade}."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
## 📎 Example: | ||
|
||
```py | ||
class Student: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agregar los cambios que se pidieron en el readme en español
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
No description provided.