Python DTda ekranga qanday natija chiqadi?
a = (1, 2, 3, 4, 5)
del a[1]
print(a)
1) (1, 3, 4, 5)
2) True
3) Error
4) (2,)
******
Python DTda ekranga qanday natija chiqadi?
lst = ['hello']
lst.extend("world")
print(lst[1])
1) w
2) World
3) ['world']
4) ['hello', 'world']
*****
Python DTda ekranga qanday natija chiqadi?
text = "salom"
print(text[3:] + text[:3])
1) molas
2) omsal
3) samol
4) Error
******
Python DTda ekranga qanday natija chiqadi?
text = "Hello World"
print(text.isupper())
1) True
2) Error
3) False
4) HELLO WORLD
******
Python DTda ekranga qanday natija chiqadi?
a = [1, 'a', False]
print(type(a))
1) complex
2) list
3) bool
4) dict
******
Python DTda ekranga qanday natija chiqadi?
var = ['Python', 'test', 'the best']
var.item = var
print(var is var.item)
1) Error
2) ['Python', 'test', 'the best']
3) False
4) True
*******
Python DTda ekranga qanday natija chiqadi?
num = 0
while num < 3:
print(num, end = ' ')
num++
print(num + 1, end = ' ')
1) Error
2) 4
3) 0
4) [1, 2, 3]
******
Python DTda ekranga qanday natija chiqadi?
dct = {'lang': 'java', 'lang': 'python'}
print(dct['lang'])
1) java
2) Error
3) python
4) True
******
Python DTda ekranga qanday natija chiqadi?
x = "shirin"
def funksiya():
x = "foydali"
print("Olma "+ x)
funksiya()
1) Olma foydali
2) Olma shirin
3) Error
4) Olma
******
Python DTda ekranga qanday natija chiqadi?
x = "shirin"
def funksiya():
x = "foydali"
print("Olma "+ x)
print ("Olma "+ x)
1) Olma foydali
2) Olma shirin
3) Error
4) Olma
*******
Python DTda ekranga qanday natija chiqadi?
x = "shirin"
def funksiya():
global x
x = "foydali"
print("Olma "+x)
print ("Olma "+x)
1) Olma foydali
2) Olma shirin
3) Error
4) Olma
Do'stlaringiz bilan baham: |