علم البيانات | 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
30- How do you check if a key exists in a dictionary?
Anonymous Quiz
62%
a) key in dict
9%
b) dict.has_key(key)
5%
c) dict.contains(key)
24%
d) key.exists(dict)
31- The continue statement skips the current iteration of a loop and proceeds to the next iteration.
Anonymous Quiz
87%
a) True
13%
b) False
32- Python’s if statements require parentheses around the condition.
Anonymous Quiz
32%
a) True
68%
b) False
35- It is mandatory to use the self-parameter in all methods in Python.
Anonymous Quiz
57%
a) True
43%
b) False
36- Instance attributes of a class are shared between all objects.
Anonymous Quiz
61%
a) True
39%
b) False
37- The print() function can be used inside a class method to display values.
Anonymous Quiz
85%
a) True
15%
b) False
38- Which function is automatically called when an object is created in Python?
Anonymous Quiz
4%
a) __del__()
11%
b) __str__()
77%
c) __init__()
9%
d) __repr__()
1
40- Which method returns the size of an object in bytes?
Anonymous Quiz
74%
a) __sizeof__()
9%
b) __str__()
9%
c) __repr__()
9%
d) __init__()
42- A subclass can inherit from multiple classes in Python.
Anonymous Quiz
83%
a) True
17%
b) False
43- What will be the output of print(5 * 2 ** 2)?
Anonymous Quiz
5%
a) 10
86%
b) 20
4%
c) 30
5%
d) 15
44- What will print("5" * 3) output?
Anonymous Quiz
12%
a) 15
72%
b) 555
9%
c) 5 5 5
7%
d) 5555
45- What will be the output of print("Hello".replace("l", "L"))?
Anonymous Quiz
70%
a) HeLLo
7%
b) Hello
7%
c) HeLLLo
16%
d) none
46- Which method is used to remove a specific element from a list?
Anonymous Quiz
20%
a) pop()
61%
b) remove()
7%
c) discard()
13%
d) delete()
47- Python lists can contain elements of different types.
Anonymous Quiz
87%
a) True
13%
b) False
48- What will be the result of print("Hello"[1:4])?
Anonymous Quiz
7%
a) Hel
65%
b) ell
4%
c) llo
24%
d) ello
49- Which of the following is used to read a file in Python?
Anonymous Quiz
20%
a) open()
45%
b) read()
24%
c) file()
11%
d) input()
50- How can you make a string in Python all uppercase?
Anonymous Quiz
68%
a) upper()
13%
b) capitalize()
4%
c) toupper()
16%
d) uppercase()
👍1