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