nerdexam
Huawei

H13-311_V3.5 · Question #59

Python is a fully object-oriented language. Which of the following options belong to the Python object? (Multiple Choice)

The correct answer is A. Function B. Module C. Number D. Character string. In Python, everything is an object - this is a core design principle of the language, not just a feature. Functions (A) are first-class objects, meaning they can be assigned to variables, passed as arguments, and have attributes like any other object. Modules (B) are also…

AI Overview

Question

Python is a fully object-oriented language. Which of the following options belong to the Python object? (Multiple Choice)

Options

  • AFunction
  • BModule
  • CNumber
  • DCharacter string

How the community answered

(28 responses)
  • A
    100% (28)

Explanation

In Python, everything is an object - this is a core design principle of the language, not just a feature. Functions (A) are first-class objects, meaning they can be assigned to variables, passed as arguments, and have attributes like any other object. Modules (B) are also objects of type module, accessible and inspectable at runtime. Numbers (C) such as integers and floats are instances of built-in classes like int and float, not primitive types as in languages like Java or C. Strings (D) are instances of the str class and expose dozens of methods, confirming their object nature.

Since all four options are correct, the question tests whether students know that Python has no true "primitives" - unlike C or Java, where numbers and characters exist outside the object system. Students are most likely to incorrectly exclude numbers or functions, assuming they are primitive or special-cased.

Memory tip: Use the phrase "In Python, nothing is naked" - every value, no matter how simple, is wrapped in an object with a type, identity, and methods you can call on it.

Topics

#Python OOP#Object model#Built-in types#Python fundamentals

Community Discussion

No community discussion yet for this question.

Full H13-311_V3.5 Practice