77- Polymorphism refers to the ability to use a single method or operator with different objects.
Anonymous Quiz
77%
a) True
23%
b) False
78- In Python, super() can be used even when there is no method name conflict between the parent and child classes.
Anonymous Quiz
63%
a) True
37%
b) False
79- Abstract classes in Python cannot have any methods implemented.
Anonymous Quiz
52%
a) True
48%
b) False
🤔1
81- In Python, method overriding allows a subclass to define its own version of a method.
Anonymous Quiz
90%
a) True
10%
b) False
_ represents an entity in the real world with its identity and behaviour.
Anonymous Quiz
8%
A method
64%
An object
18%
A class
11%
An operator
_ is used to create an object.
Anonymous Quiz
51%
class
31%
constructor
15%
User-defined functions
3%
In-built functions
What is setter used for?
Anonymous Quiz
31%
To access the attribute of the object
46%
To set an attribute
19%
To check if an attribute exists or not
4%
To delete an attribute
82- Polymorphism is the ability to perform different operations using the same function or operator.
Anonymous Quiz
88%
a) True
12%
b) False
83- The __init__() function is called automatically when a class is destroyed.
Anonymous Quiz
56%
a) True
44%
b) False
84- The pass statement is used to delete the content of a function.
Anonymous Quiz
22%
a) True
78%
b) False
85- How can you start a block of code for a function or loop?
Anonymous Quiz
63%
a) With a colon :
10%
b) With a semicolon ;
8%
c) With curly braces {}
19%
d) With parentheses ()
86- Which function is used to read input from the user in Python?
Anonymous Quiz
75%
a) input()
5%
b) read()
3%
c) scan()
17%
d) get()
87- How do you access the first element of a list my_list?
Anonymous Quiz
5%
a) my_list[1]
87%
b) my_list[0]
3%
c) my_list.first()
5%
d) my_list.get(0)
88- Which function would you use to convert a string to an integer?
Anonymous Quiz
90%
a) int()
2%
b) str()
5%
c) float()
3%
d) list()
89- How do you define a set in Python?
Anonymous Quiz
20%
a) set = [1, 2, 3]
30%
b) set = (1, 2, 3)
42%
c) set = {1, 2, 3}
8%
d) set = 1, 2, 3
90- Which function is used to get the absolute value of a number?
Anonymous Quiz
67%
a) abs()
7%
b) value()
18%
c) absolute()
8%
d) num()
91- What will print(round(3.14159, 2)) output?
Anonymous Quiz
69%
a) 3.14
15%
b) 3.142
7%
c) 3.1
10%
d) 3
92- Which method is used to convert a string to lowercase?
Anonymous Quiz
77%
a) lower()
13%
b) to_lower()
7%
c) downcase()
3%
d) casefold()
93- Which method returns the number of occurrences of a substring in a string?
Anonymous Quiz
61%
a) count()
16%
b) find()
21%
c) index()
2%
d) search()