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