Python Objects Quiz
FREE Online Courses: Your Passport to Excellence - Start Now
Quiz Summary
0 of 10 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 10 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 10
1. Question
Which of the following represents a real-world entity?
CorrectIncorrect -
Question 2 of 10
2. Question
In Python, everything is an object of ____ class.
CorrectIncorrect -
Question 3 of 10
3. Question
What keyword is used to delete an object in Python?
CorrectIncorrect -
Question 4 of 10
4. Question
What type of attributes create unique objects in Python?
CorrectIncorrect -
Question 5 of 10
5. Question
Which of the following statement(s) is/are true?
Statement 1: Giving different names to the same object is called Object Aliasing.
Statement 2: Python raises a NameError when we try to access a deleted object.
CorrectIncorrect -
Question 6 of 10
6. Question
What is the output of the above code?
Code
>>> class Person:
>>> def __init__(self, name, age):
>>> self.name = name
>>> self.age = age
>>> age = 50
>>> p1 = Person(“Sam”, 24)
>>> print(p1.name, p1.age)
CorrectIncorrect -
Question 7 of 10
7. Question
What is the output of the below code?
Code
>>> class Apple:
>>> def __init__(self, apples):
>>> self.apples = apples
>>> a1 = Apple(100)
>>> a2 = Apple(25)
>>> a3 = Apple(a1.apples % (Apple(10).apples + a2.apples))
>>> print(a3.apples)
CorrectIncorrect -
Question 8 of 10
8. Question
What is the output of the below code?
Code
>>> class C1:
>>> def __init__(self):
>>> self.i = 10
>>> obj1 = C1()
>>> obj2 = obj1
>>> obj3 = obj2
>>> del obj2
>>> print(obj1.i)
CorrectIncorrect -
Question 9 of 10
9. Question
What is the output of the below code?
Code
>>> class Sum:
>>> def __init__(self, n):
>>> self.n = n
>>> num = 0
>>> if isinstance(int, object):
>>> num += 1
>>> if isinstance(num, object):
>>> num += 4
>>> if isinstance(Sum, object):
>>> num += 6
>>> N = Sum(num)
>>> if isinstance(N, (object, Sum)):
>>> num += 2
>>> print(N.n + num)
CorrectIncorrect -
Question 10 of 10
10. Question
What is the output of the below code?
Code
>>> class Square:
>>> def __init__(self, side):
>>> self.side = side
>>> self.area = side*side
>>> s1 = Square(Square(Square(2).side).area)
>>> print(s1.area)
CorrectIncorrect