Level 10 : Which of the following statements is incorrect about the following code?


class People():

  def __init__(self, name):
    self.name = name

  def namePrint(self):
    print(self.name)

person1 = People("Sally")
person2 = People("Louise")
person1.namePrint()

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