Laboratoriya 1 O’zgaruvchi e’lon qiling va uni ekranga chop eting
Download 16,32 Kb.
|
lab1
Laboratoriya 1
uzgaruvchi = "Salom Python" print(uzgaruvchi)
matn = "Salom dunyo" print(len(uzgaruvchi))
son = 5 if son % 2 == 0: print("Juft son") else: print("Toq son")
ruyxat = [22, 2, 6, 7, 4, 11, 32, 66, 8, 99, 65] ruyxat.sort() print(ruyxat) ruyxat.reverse() print(ruyxat) ruyxat.append(23) print(ruyxat) print(len(ruyxat)) 5. Berilgan ro’yxatning elementlarini ekranga chop eting va yig’indisini hisoblang yigindi = 0 for element in ruyxat: print(element) yigindi += element print(yigindi) 6. Lug’at yarating va uning kalit so’zlarini ekranda chop eting noutbuk = {'brend': "HP", 'rangi': 'qora', 'tezkorXotira': 16} for key in noutbuk.keys(): print(key) Download 16,32 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling