Python ko’p qatorli izohlar hosil qilish uchun qaysi belgilardan foydalaniladi?


mashina = ["Audi", "Mustang", "Ferrari"]


Download 27.45 Kb.
bet4/7
Sana04.02.2023
Hajmi27.45 Kb.
#1159712
1   2   3   4   5   6   7
Bog'liq
python javoblar

mashina = ["Audi", "Mustang", "Ferrari"]
print(mashina[-1])

1) Audi
2) Mustang


3) Ferrari
4) Error


********


Python DTda ekranga qanday natija chiqadi?
meva = ["olma", "banan", "apelsin", "nok", "uzum"]
print(meva[1:4])

1) ['banan', 'apelsin', 'nok']


2) ['apelsin', 'nok', 'uzum']
3) ['olma', 'banan', 'apelsin']
4) ['banan', 'apelsin', 'nok', 'uzum']


******


Python DTda ekranga qanday natija chiqadi?
meva = ["olma", "banan", "apelsin", "nok", "uzum"]
print(len(meva))

1) 4
2) 5


3) 6
4) 0


******


Python DTda ekranga qanday natija chiqadi?
meva = ["olma", "banan", "apelsin", "nok", "uzum"]
meva.insert(0, "anor")
print(meva)

1) ['olma', 'anor', 'banan', 'apelsin', 'nok', 'uzum']


2) ['olma', 'banan', 'anor', 'apelsin', 'nok', 'uzum']
3) ['anor', 'olma', 'banan', 'apelsin', 'nok', 'uzum']
4) ['olma', 'banan', 'apelsin', 'nok', 'uzum', 'anor']


******


Python DTda ekranga qanday natija chiqadi?
a = [1, 2, 3, 4, 5]
b = [5, 6, 7]
c= a + b
print(c)

1) [1, 2, 3, 4, 5, 5, 6, 7]


2) [1, 2, 3, 4, 5, 6, 7]
3) [1, 2, 3, 4, 10, 6, 7]
4) Error

******



Python DTda ekranga qanday natija chiqadi?
meva = ["olma", "banan", "apelsin", "nok", "uzum"]
meva.sort()
print(meva)

1) ['apelsin', 'banan', 'nok', 'olma', 'uzum']


2) ['apelsin', 'nok', 'banan', 'olma', 'uzum']
3) ['olma', 'banan', 'apelsin', 'nok', 'uzum']
4) ['banan', 'nok', 'olma', 'uzum', 'apelsin']



Download 27.45 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7




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