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