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 | 1736+ Python FAQs | Share
nested-loop | list-comprehension | input | dictionary | command-line-parsing | raise | operations | pseudocode | set-operation | object-attribute | id-function | assert | match | asyncio | identity-operator | basic | python-history | max-min | loop | sys | shallow-copy | escape-operator | condition | classes | immutability | functional-programming | typeerror | operators | input-function | while-else-loop | design-principle | sorted | destructor | floating-point-precision | frozenset | conversion | iterable | built-in-function | __all__-attribute | encapsulation | function-argument | identifier | implementation | overflow | python-repl | enumerate() | logical-operator | math-copysign | sum() | file | global | with-statement | built-in-function | multiple-inheritance | matplotlib | bitwise-operator | feature | slicing | data-structure | __init_subclass__ | thread | mysql | collection | inheritance | global-keyword | type-conversion | mapping-function | static-method | datetime | sys-module | math | variable | stack | invalid-list | fabs-function | docstring | loops | string-method | list-mutation | pickling-&-unpickling | exponentiation | factorial-function | split | round | exception-handling | access-modifier | zip | staticmethod | dictionaries | touples | complex-number | higher-order-function | while-and-for-loop | binary | logical-operation | expression | keyword | expand-tab | string-formatting | version-check | string-concatenation | statement | global-variable | string | comment | application | def | name-mangling | head-and-tail | turtle | data_structure | operator-or | range | logical-operator | center | postfix | data-structure | arithmetic-operation | syntax-error | list-operation | operand | python-django | control-statement | call | list-comprehension | generators-in-python | append | zip-function | interpreter | choice | asyncio-module | operator | class-and-instance-variable | int | else-statement | syntaxerror | boolean-and-non-boolean | scientific-notation | dicts | iterator | pandas | built-in | yield | matrix-list-comprehension | datatype | oops | sum-function | comprehension | memory-management | syntax-error | copy | namedtuple | list-slicing | regex | exception-handling | update | zfill-function | python-module | recursion | complex | attribute | __future__ | rollback | multithreading | module | generator | pep | list-vs-tuple | benefit | integer | min-max-function | tuple-unpacking | set | regular-expression | lambda | list-indexing | formal-and-actual-parameter | operator-and | precedence-and-associativity | version | library | slice | odd-number | conditional-statement | methods | polymorphism | goto-function | default-mutable-argument | min-function | decorator | exception | memory | magic-method | input-function | conditional-statement | software-design | global-variable | string-iteration | indentation | import-method | data-structures | lambda-function | data-type | installation | namespace | list | async | recurssion | compute | init | string-slicing | objects | operator-overloading | file-handling | file-handling | list-join | multiprocessing | virtual-environment | context-manager | identity-operator | file_handling | lambdas | indexing | debugging | comparison | list-method | method | counter | filter | constructor | random-function | print | python_version | for | syntax | string-method | assignment-operator | matrix | descriptors | lists | precedence | function-and-scope | virtual-environment | bitwise | arithmetic-expression | round-function | type-conversion | type_conversion | encoding | mathematical-function | python | gil | string-slicing | format | filter-function | print-statement | numeric | immutable-data-type | mathematics | heap-memory | parameter | return-statement | random | decimal | counter-function | error | oop | error-handling | while-loop | collections | control-flow | class | swapping | mutable | function | map-function | data-type | numpy | class-and-object | threading | loop-control | control-flow | package-management | string-manipulation | sorting | tuple | string-formatting | inherit | functions | boolean | array | deep-copy | binary-operation | class-and-inheritance | generators | join | bitwise-operator ...