Python DTda ekranga qanday natija chiqadi?
for i in "hello world":
if i =='o':
continue
print(i*2, end = '')
1) hheellll wwrrlldd
2) hheellll
3) hell wrld hell wrld
4) helloo woorld
*****
Python DTda ekranga qanday natija chiqadi?
>>> S = ‘spameggs’
>>> S[::-1]
1) pameggss
2) sggemaps
3) spamegg
4) eggsspam
******
Pythonda satr yuqori registrdagi belgilardan iboratligini tekshirishish metodi qaysi?
1) S.replace()
2) S.isalpha()
3) S.islower()
4) S.isupper()
******
Pythonda satr quyi registrdagi belgilardan iboratligini tekshirishish metodi qaysi?
1) S.replace()
2) S.isalpha()
3) S.islower()
4) S.isupper()
*******
Python DTda ekranga qanday natija chiqadi?
>>> c = [c*3 for c in ‘list’ if c!=’i’]
>>> c
1) [‘lll’,’sss’,’ttt’]
2) [‘lll’,’iii’,’sss’,’ttt’]
3) [‘iii’]
4) [‘lll’,’i’,’sss’,’ttt’]
******
Python DTda ekranga qanday natija chiqadi?
num = round(5.5369, 1)
print(num)
1) 5.6
2) 5.5
3) 6.0
4) 5.0
*****
Python DTda ekranga qanday natija chiqadi?
a = ['Tony', 'Jony', 'Pony']
update('Loly')
print(a)
1) Error
2) ['Tony', 'Jony', 'Pony', {'Loly'}]
3) {'Tony', 'Jony', 'Pony', 'Loly'}
4) ['Tony', 'Jony', 'Pony', 'Loly']
******
Python DTda ekranga qanday natija chiqadi?
a = range(1, 12)
print(a)
1) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
2) range(1, 12)
3) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
4) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
*****
Do'stlaringiz bilan baham: |