علم البيانات | DS2 Quizes – Telegram
علم البيانات | DS2 Quizes
966 subscribers
96 photos
2 videos
14 files
110 links
"قناة علمية متخصصة في مجال علم البيانات، قناة خاصة بالاختبارات MCQ ."
القناة العامة: @Computer_DS_1
النقاشات: @Computer_DS1
قناة الاختبارات: @Computer_DS_2
بوت التواصل والمشاركات : @DS_Combot
Download Telegram
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()
96- Which method adds multiple elements to a list?
Anonymous Quiz
36%
a) extend()
30%
b) append()
18%
c) insert()
16%
d) add()
97- What will be the result of print("abc" * 2)?
Anonymous Quiz
67%
a) abcabc
3%
b) aabbcc
9%
c) abc2
21%
d) SyntaxError
98- What is the output of print(3 == 3.0)?
Anonymous Quiz
49%
a) False
41%
b) True
5%
c) SyntaxError
5%
d) None
👍1👎1
99- Which operator is used for string concatenation in Python?
Anonymous Quiz
60%
a) +
18%
b) &
10%
c) -
12%
d) |
100- A class in Python can inherit from multiple classes at once.
Anonymous Quiz
80%
a) True
20%
b) False
ID:101
class Animal:
def sound(self):
return "Animal makes sound"
class Dog(Animal):
def sound(self):
return "Dog barks"
dog = Dog()
print(dog.sound())
ID:102
 
class A:
def method(self):
return 'A method'
class B(A):
def method(self):
return 'B method'
obj = A()
print(obj.method())
ID:102 - What will the following Python code output?
Anonymous Quiz
55%
A) A method
29%
B) B method
13%
C) method is not defined
3%
D) None of the above
ID:103
 
class X:
def __init__(self, name):
self.name = name
def __eq__(self, other):
return self.name == other.name
x1 = X("Alice")
x2 = X("Alice")
print(x1 == x2)
ID:103 - What is the output of the following code?
Anonymous Quiz
77%
A) True
9%
B) False
11%
C) Error: __eq__ method is not valid
3%
D) None of the above
ID:104
 
x = 10
def func():
global x
x = 20
func()
print(x)
ID:104 - What will be the output of the following?
Anonymous Quiz
16%
A) 10
80%
B) 20
2%
C) Error
3%
D) None of the above
ID:105
 
class A:
def display(self):
print("Class A")
class B(A):
def display(self):
print("Class B")
class C(B):
pass
obj = C()
obj.display()