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