This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Robot: | |
| def __init__(self, name, model_no, creator): | |
| self.name = name | |
| self.model_no = model_no | |
| self.creator = creator | |
| def walk(self): | |
| return 'I am walking using my wheels' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Animal: | |
| def __init__(self, name, species): | |
| self.name = name | |
| self.species = species | |
| def speak(self): | |
| return 'blah blah' | |
| class Dog(Animal): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person: | |
| def __init__(self, first, last): | |
| self.firstname = first | |
| self.lastname = last | |
| def name(self): | |
| return f'{self.firstname} {self.lastname}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person: | |
| def __init__(self, first, last): | |
| self.firstname = first | |
| self.lastname = last | |
| def name(self): | |
| return f'{self.firstname} {self.lastname}' |
NewerOlder