for i
in x:
print(i.upper())
A) ABCD B) abcd C) a BCD D) xato
№
23.Qanday usul bilan klassdan yangi obyekt yaratish mumkin?
A) start() B) create() C) init() D) new()
№
24.Qanday faylda Django proyekti uchun middleware lar joylashadi?
A) models.py B) urls.py C) views.py D) settings.py
№
25.Quyidagilardan qaysi biri Python dasturlashda asosiy ma’lumotlar turiga kirmaydi?
A) Lists B) Class C) Dictionary D)
Tuples
№
26 Quyidagi Python kodining natijasi qanday bo'ladi?
1. class tester:
2. def __init__(self, id):
3. self.id = str(id)
4. id="224"
5.
6. >>>temp = tester(12)
7. >>>print(temp.id)
A) Yo‘q
B) 12
C) 224
D) Xato
№
27 Qanday kodlash orqali faylni ochish mumkin?
A) file = read ("filename.txt")
B) file = close ("filename.txt")
C) file = open ("filename.txt")
D) file = write ("filename.txt")
№
28 Qanday faylda Django proyektida migrations joylashadi?
A) urls.py B) migrations.py C) models.py D) views.py
№
29 Qanday usul bilan, fayllarni ko'chirish mumkin?
A) move() B) copy() C) paste() D) rename()
№
30 Inheritance nima?
A)
Klass yaratish usuli
B) Bitta
klass ichidagi boshqa klass
C) Klassni ichidan o'chirish usuli
D)
Bitta klassdan boshqa klass