Home / MCQ Bank / Computer
Computer Classes And Objects In Python

How can you create a private attribute in a Python class?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • By prefixing the attribute name with an underscore (_)

Related Computer Questions

What will be the output of the given program? #include<stdio.h> void main() { int a=11,b=5; if(a=5) b++; printf("%d %d", ++a, b++); } The given array is arr = {1, 2, 4, 3, 5}.The number of iterations required to sort the array using gnome sort will be ______ A ______ represents a distributed, immutable collection of elements of type T. Which machine learning algorithm is commonly used for recommendation systems, such as suggesting products to online shoppers? What does the 'else if' statement allow in C++?