علم البيانات | DS2 Quizes – Telegram
علم البيانات | DS2 Quizes
965 subscribers
96 photos
2 videos
14 files
110 links
"قناة علمية متخصصة في مجال علم البيانات، قناة خاصة بالاختبارات MCQ ."
القناة العامة: @Computer_DS_1
النقاشات: @Computer_DS1
قناة الاختبارات: @Computer_DS_2
بوت التواصل والمشاركات : @DS_Combot
Download Telegram
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()
ID:105 - What will be the output of the following Python code?
Anonymous Quiz
12%
A) Class A
68%
B) Class B
17%
C) Error: display is not defined in class C
3%
D) None of the above
ID:106
 
x = [1, 2, 3]
x.append(4)
print(x)
ID:106 - What is the output of the following code?
Anonymous Quiz
88%
a) [1, 2, 3, 4]
6%
b) [1, 2, 3]
5%
c) [4, 1, 2, 3]
2%
d) [1, 2, 3, [4]]
ID:107
 
x = "Python"
print(x[2:])
ID:107 - What will the following code output?
Anonymous Quiz
66%
a) thon
22%
b) Py
12%
c) Python
ID:108
 
x = [1, 2, [3, 4]]
print(len(x[2]))
ID:108 - What will the following code output?
Anonymous Quiz
60%
a) 2
19%
b) 3
10%
c) 4
11%
d) None
ID:110
 
class CountryInfo:
def print_language(self):
print('English')
class Lebanon(CountryInfo):
def print_language(self):
print('Arabic')
lb = Lebanon()
lb.print_language()
ID:110 - What will the following code print?
Anonymous Quiz
11%
a) English
82%
b) Arabic
2%
c) Error
5%
d) Nothing
ID:111
 
class Salary:
value = 0
def print_salary(self):
print('Salary:', self.value)
salary = Salary()
salary.value = 1500
salary.print_salary()
ID:111 - What is the output of the following code?
Anonymous Quiz
8%
a) Salary: 0
72%
b) Salary: 1500
0%
c) Salary: None
20%
d) Error
ID:112
 
class A:
x = 10
obj = A()
obj.x = 20
print(A.x)
👍3
ID:112 - What will the following code output?
Anonymous Quiz
61%
a) 20
30%
b) 10
3%
c) None
6%
d) Error
class A:
x = 10
obj = A()
obj.y = 20
print(obj.y)
علم البيانات | DS2 Quizes
class A: x = 10 obj = A() obj.y = 20 print(obj.y)
What will the following code output?
Anonymous Quiz
4%
10
65%
20
30%
Error
1%
None of above
class A:
def __init__():
x = 10
obj = A()
obj.y = 20
print(obj.y)
علم البيانات | DS2 Quizes
class A: def __init__(): x = 10 obj = A() obj.y = 20 print(obj.y)
What will the following code output?
Anonymous Quiz
74%
20
5%
10
16%
Error
4%
None of above
ID:113
 
i = 1
while True:
if i % 2 == 0:
break
print (i)
i += 2