Uploaded by Abdumaruf Zaitov

pythondan amalaiy A.Asqarovich

advertisement
Abiyorqulov Azamat Asqarovich
1-misol
print(sum(i for i in range(11,100,2)))
2-misol
input_number = int(input("Iltimos, son kiriting: "))
a = int(input("butun son kiriting = "))
if a>0:print(a+1)
else: print(a)
3-misol
for i in range(10,100):
if i%5==0 and i%4!=0:
print(i)
4-misol
ranglar = ["qizil", "yashil", "ko'k", "sariq", "oq", "qora", "kulrang"]
print("Birinchi rang:", ranglar[0])
print("Oxirgi rang:", ranglar[-1])
5-mislol
royxat = [5, -3, 7, -2, 0, 8, -9, 10]
musbat_sonlar = [x for x in royxat if x > 0]
print("Musbat sonlar:", musbat_sonlar)
Download