Qo‘qon davlat pedagogika instituti Sirtqi (maxsus sirtqi) bo‘limi Matematika-informatika ta’limi yo‘nalishi 3-kurs talabalari uchun Tanlov fan(Python dasturlash tili) fanidan oraliq nazorat test savollari


Download 90.25 Kb.
bet1/2
Sana20.06.2023
Hajmi90.25 Kb.
#1627280
  1   2
Bog'liq
Var1(Oraliq 6 sem)


Qo‘qon davlat pedagogika instituti Sirtqi (maxsus sirtqi) bo‘limi Matematika-informatika ta’limi yo‘nalishi 3-kurs talabalari uchun Tanlov fan(Python dasturlash tili) fanidan oraliq nazorat test savollari.
Ushbu oraliq nazorat baholash savollari “Informatika” kafedrasining 2022 yil 24-avgustdagi № 1-sonli yig‘ilishida ko‘rib chiqilgan va tasdiqlangan.

5 baho

4 baho

3 baho

2 baho

27-30 ta

21-26 ta

18-20 ta

1-17 ta

Maksimal baho: 5 Saralash baho: 3


Вариант: №1.

1. Quyidagilardan qaysi biri Python tilidagi o‘zgaruvchilar nomlari uchun to‘g‘ri?
A) cheklanmagan uzunlik
B) pastki chiziq va ampersandga ruxsat berilgan ikkita maxsus belgidir
C) qayd etilganlardan hech biri
D) barcha xususiy a'zolarda bosh va keyingi pastki chiziq bo'lishi kerak
2.Classni ichiga qanday funksiya yaratiladi?
A) Method
B) Obj
C) Fun
D) Def
3. Qanday fayl Django proyektida barcha URL larni o'z ichiga oladi?
A) models.py
B) settings.py
C) urls.py
D) views.py
4. Quyidagi Python kodining natijasi qanday bo'ladi?
x = [[0], [1]]; print((' '.join(list(map(str, x))),))
A) ('[0] [1]',)
B) ('01')
C) 01
D) [0] [1]
5. Qanday faylda Django proyekti uchun media fayllari joylashadi?
A) static
B) media
C) templates
D) models.py
6.Qanday usul bilan, faylni boshidan boshlab qator-qator o'qish mumkin?
A) seek(0)
B) write()
C) read()
D) readline()
7. Qanday usul bilan klass ichidagi metodlarni yopish mumkin?
A) obj.bases
B) obj.module
C) obj.class
D) obj.dict
8. Graph modulida qanday usul bilan obyektning rangini o'zgartirish mumkin?
A) setOutline() metodi
B) changeColor() metodi
C) setFill() metodi
D) modifyColor() metodi
9.Qanday faylda Django proyekti uchun static fayllar joylashadi?
A) static B) media C) templates D) models.py
10.for i in “hello world”:
if i ==’o’:
continue
print(i*2, end = ‘ ‘) Phyton DTda ekranga qanday natija chiqadi?
A) hheellll wwrrlldd
B) hell wrld hell wrld
C) hheellll
D) helloo woorld
11. Django proyektida URL qanday yo'l bilan ma'lum qilinadi?
A) urls.py fayli orqali
B) settings.py fayli orqali
C) views.py fayli orqali
D) models.py fayli orqali
12. Django qanday asosda ishlashini qo'llaydi?
A) Model-View-Controller (MVC)
B) Model-View-Template (MVT)
C) Model-View-Adapter (MVA)
D) Model-Controller-Template (MCT)
13. Graph modulida foydalaniladigan qanday method orqali bir nechta obyektlarni yaratish mumkin?
A) createObjects()
B) makeObjects()
C) buildObjects()
D) drawObjects()
14.Quyidagi Python ifodalarining qiymatlari qanday?
2 ** ( 3 ** 2 ) ; ( 2 ** 3 ) ** 2 ; 2 ** 3 ** 2
A) 64, 512, 64 B) 512, 512, 512
C) 512, 64, 512 D) 64, 64, 64
15. Faylni yopish uchun qanday funktsiya ishlatiladi?
A) close() B) finish() C) end() D) stop()
16.Qanday usul bilan, klass orqali objekt yaratishdan avval qo'shimcha ishlarni amalga oshirish mumkin?
A) str methodi orqali B) dict methodi orqali
C) init methodi orqali D) new methodi orqali
17.Django framework-i qaysi tashkilot yaratilgan?
A) Facebook tomonidan
B) Microsoft tomonidan
C) National Science Foundation tomonidan
D) Google tomonidan
18. Quyidagilardan qaysi biri Python korteji hisoblanadi?
A) {} B) {1, 2, 3} C) (1, 2, 3) D) [1, 2, 3]
19.Qanday faylda Django proyektining istemolchilariga moslashuvchan asosiy qism joylashadi?
A) urls.py B) views.py C) settings.py D) models.py
20.Quyidagi funksiyalardan qaysi biri pythonda o‘rnatilgan funksiya hisoblanadi?
A) print() B) seed() C) factorial() D) sqrt()
21.Quyidagi Python dasturida "natija" qiymati qanday bo'ladi?
list1 = [1,2,3,4]; list2 = [2,4,5,6]; list3 = [2,6,7,8]
result = list()
result.extend(i for i in list1 if i not in (list2+list3) and i not in result)
result.extend(i for i in list2 if i not in (list1+list3) and i not in result)
result.extend(i for i in list3 if i not in (list1+list2) and i not in result)
print(result)
A) [1, 2, 4, 7, 8]
B) [1, 7, 8]
C) [1, 3, 5, 7, 8]
D) xato
22.Quyidagi Python kodining natijasi qanday bo'ladi?
x = 'abcd'

Download 90.25 Kb.

Do'stlaringiz bilan baham:
  1   2




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling