Level 1 : Identify the issue in this inheritance scenario:


class Bird(Animal):
def fly(self):
pass, class Penguin(Bird):
def fly(self):
print("Can't fly")

Author: KaivalyaG | Tags: inheritance | 1859+ Python FAQs | Share
namedtuple | else | global-keyword | interpreter | basic | integer | anchors-(^,-$) | file_handling | class-and-object | identity-operators-(is,-is-not) | generator | bitwise | factorial-function | function-argument | directory-operations | error | bitwise-operator | access-modifier | built-in-modules | else-statement | assignment-operator | input-function | array | call | generators | built-in-function | boolean-masking | classes | formatting-with-strftime | iterator | aggregating-data-with-functools.reduce() | comparison | benefit | async | error-handling | lambda-function | postfix | binary-operation | package-management | sorted | head-and-tail | string-method | docstring | list-vs-tuple | regular-expressions | inherit | list-slicing | reading-and-writing-large-files-efficiently | loop-control-statements | operator-and | format | global-variable | set | scientific-notation | __init_subclass__ | syntax-error | namespace | test-discovery | introduction-to-python | filter-function | reading:-read(),-readline(),-readlines() | sets | string-iteration | asyncio-module | function-and-scope | multithreading | statement | class | init | list-operation | multiple-inheritance | module | data-type | installation | operator | sum-function | matrix | sys | threading | operators | data-structure | max-min | introduction-to-multiprocessing | python-repl | logical-operator | math | string-methods | nested-loop | string-slicing | complex | global-variable | print | mysql | class-and-instance-variable | datatype | working-with-file-paths | immutable-data-type | conditional-statement | round | goto-function | random-function | enumerate() | recursion | multiple-except-blocks | quantifiers-(*,-+,-?,-{}) | polymorphism | destructor | python | type-conversion | object-attribute | handling-missing-values-(fillna,-dropna) | list-methods-and-slicing | literal-characters-and-special-characters | logical-operator | class-decorators | string-slicing | type-conversion | single-inheritance | rollback | tuples | zip-function | numpy | pseudocode | python-history | regular-expression | operations | membership-operators-(in,-not-in) | type-conversion-and-casting | mutable | opening-files-(open()) | sum() | why-use-multiprocessing-over-threading?-(gil) | matplotlib | yield | min-function | virtual-environment | raise-statement | loops | loop | python-django | logical-operation | using-else-and-finally | shallow-copy | syntax-error | copy | list-comprehension | comment | list | inheritance | floating-point-precision | creating-and-starting-threads | expression | data_structure | counter-function | built-in | default-mutable-argument | function | gil | exponentiation | keyword | def | operator-overloading | reading-and-writing-files | strings | objects | python_version | tuple | list-mutation | overflow | set-operation | list-method | static-method | staticmethod | creating-custom-modules | while-loops | string-concatenation | map-function | range | raise | random | numeric | odd-number | virtual-environment | functional-programming | recurssion | dictionary | syntaxerror | mathematics | slicing | exception-handling | data-type | assignment-operators | precedence | string | using-assertions-(assertequal,-assertraises) | complex-number | difference-between-threads-and-processes | regex | multiprocessing | list,-set,-and-dictionary-comprehensions | unit-testing | functions | string-manipulation | round-function | pandas | decorator | python-module | list-comprehensions | invalid-list | design-principle | slice | floats | integers | default-arguments | data-structures | datetime.date,-datetime.time,-datetime.datetime | memory-management | append | update | parameter | dataframe-and-series-objects | exception-handling | assert | syntax | dictionary-comprehensions | immutability | indexing | touples | pep | iterable | escape-operator | software-design | debugging | sys-module | sorting-and-ranking | intering | thread | __future__ | variable | dictionaries | string-method | split | attribute | expand-tab | string-formatting | filter | class-and-inheritance | descriptors | list-join | context-manager | mapping-function | return-statement | counter | mathematical-function | implementation | using-the-threading-module | data-structure | library | lists | defining-functions | stack | comprehension | built-in-function | swapping | name-mangling | sorting | list-indexing | control-flow | higher-order-function | working-with-temporary-files-using-tempfile | zip | key-value-pairs | identity-operator | file-handling | thread-synchronization | loop-control | application | formal-and-actual-parameter | tuple-unpacking | dictionary-methods | int | thread-safe-data-structures-(queue.queue) | datetime | id-function | __all__-attribute | for | boolean-and-non-boolean | pass | join | tuple-methods | compute | binary | indexing:-loc-vs-iloc | file-handling | exception | magic-method | boolean | precedence-and-associativity | with-statement | global | deep-copy | error-handling | encapsulation | arithmetic-expression | while-loop | logical-operators | matrix-list-comprehension | encoding | decimal | operand | data-types | bitwise-operator | fabs-function | type_conversion | collection | input | math-copysign | overriding-methods | asyncio | python-operators | file | iterators | feature | typeerror | command-line-parsing | functional-programming | frozenset | method-overloading | import-method | condition | managing-directories-with-os-and-shutil | using-yield-in-functions | dicts | generators-in-python | version | parsing-with-strptime | min-max-function | python-syntax-and-structure | walking-through-directories-using-os.walk() | center | methods | joining-and-merging-dataframes | memory | identifier | arithmetic-operation | collections | constructor | turtle | control-flow | introduction-to-threads | choice | advanced-file-operations | using-lists-as-stacks | using-map()-for-transformations | lambdas | while-and-for-loop | match | arbitrary-arguments-(*args,-**kwargs) | list-comprehension | using-join()-and-is_alive()-methods | lambda | method | working-with-binary-files-(rb,-wb) | pickling--unpickling | identity-operator | heap-memory | lambda-functions | input-function | version-check | time-series-with-pandas | filtering-and-indexing | booleans | operator-or | indentation | oops | conditional-statement | working-with-dates-and-times | conversion | print-statement | data-type-conversions | oop | using-os-and-pathlib-modules | writing:-write(),-writelines() | zfill-function | string-formatting | data-structures-in-python | control-statement | conditional-statements | while-else-loop | multiple-inheritance ...