Created
May 11, 2025 15:17
-
-
Save JessicaWachtel/4606eb91e8d64f9ef959a2c959f8851d to your computer and use it in GitHub Desktop.
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 Bird: | |
def fly(self): | |
print("Flying high") | |
class Penguin(Bird): | |
def fly(self): | |
print("I can't fly!") | |
bird = Bird() | |
bird.fly() # Output: Flying high | |
penguin = Penguin() | |
penguin.fly() # Output: I can't fly! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment