boshlangich=int(input("Boshlang'ich juft sonni kiriting:")) oxirgi=int(input("Oxirgi juft sonni kiriting:")) qatnashgan_sonlar_soni=(oxirgi-boshlangich+2)/2 jami=(boshlangich+oxirgi)/2*qatnashgan_sonlar_soni print("n ta ketma-ket kelgan juft sonlar yigindisi:",jami)
n = int(input("Son kiriting: ")) yigindi = 0 for son in range(2, n+1): juft = son % 2 if juft == 0: yigindi += son else: continue print("Yegindi: ", yigindi)
n = input("Biror musbat son kiriting: ") natija = 0 for son in range(int(n)): if son % 2 == 0: natija += son print("1 dan", n, "gacha bo'lgan juft sonlarning yig'indisi ",natija, "ga teng.")
n=int(input("Sonni kiriting: ")) natija=0 for son in range(0,n+2): if son%2==0: natija+=son print("2 dan",n," gacha bo`lgan juft sonlar yig`indisi",natija,"ga teng")
boshlangich=int(input("Boshlang'ich juft sonni kiriting:")) oxirgi=int(input("Oxirgi juft sonni kiriting:")) qatnashgan_sonlar_soni=(oxirgi-boshlangich+2)/2 jami=(boshlangich+oxirgi)/2*qatnashgan_sonlar_soni print("n ta ketma-ket kelgan juft sonlar yigindisi:",jami)
@@azamataxmatqulov5334 Assalomu alaykum! Birinchi navbatda siz n (ixtiyoriy son) ni foydalanuvchidan input orqali qabul qilib olishingiz kerak. Keyin for sikli orqali uni 2 (yaʼni birinchi juft son)dan to n gacha (juft boʻlishi uchun oraliq interval 2 bilan) aylantirasiz. Boshida s (raqamlar yigʻindisi) nolga teng boʻladi. Keyin for sikli avtomatik ravishda s ga hosil boʻlgan i (n gacha boʻlgan sonlar)ni birma-bir qoʻshib beradi. s+=i degani s = s + i, yaʼni har doim yangi hosil boʻlgan s ga i ni qoʻshib boradi. Oxirida esa hosil boʻlgan natija (s)ni print qilib qoʻyasiz!
# topshiriq son=input("Biror butun son kiriting: ") son=int(son) summa=0 for raqam in range(1,son): if raqam%2==0: summa+=raqam print("{} gacha bo`lgan juft sonlar yig`indisi {} ga teng".format(son, summa))
karra = input("Nechi karrani hosil qilmoqchisiz ") if karra.isdigit(): karra = int(karra) for son in range(1,11): natija = karra*son print('{} * {} = {}'.format(karra,son,natija)) else : print("Son kiritish lozi")
n= int(input("Istalgan sonni kiriting")) for son in range(2,n+1,2): if n%2==0: natija=(n+2)/2*(n/2) print(natija) else: natija=(n-1+2)/2*((n-1)/2) print(natija)
# 1dan n gacha bo'lgan butun sonlar yig'indisini hisoblaymiz n=int(input("biror musbat butun son kiriting:")) if n%2==0: sum=0 for son in range(2,n+1): if son%2==0: sum+=son elif n%2==1: sum=0 for son in range(2,n): if son%2==0: sum+=son else: print("biror musbat son kiriting:") print(sum)
butun_son = int ( input ('butun sonni kiriting:')) qiymat_oluvchi = 0 bolinma = butun_son % 2 if bolinma == 0 : for son in range (2,butun_son): bolinma2 = son % 2 if bolinma2 == 0: qiymat_oluvchi += son else : continue print ('2 dan {} gacha butun sonlar yigindisi {} ga teng '.format(butun_son,qiymat_oluvchi)) else: print('iltimos butun son kititing')
son = input("Sonni kiriting:") summa = 0 kupaytma = 1 if son.isdigit(): for item in range(1,int(son)+1): summa += item print("1 dan",son ,"gacha bo'lgan sonlar yig'indisi =",summa) else: print("Faqat son kiriting ...")
a1 = 2 d = 2 an = int(input("So'nggi musbat sonni kiriting: ")) n = int(an / 2) if an % 2 == 0: print("2 dan " + str(an) + " gacha bo'lgan juft sonlar yig'indisi: ", (2 + an) * an / 4) elif an % 2 == 1: print("2 dan " + str(an) + " gacha bo'lgan juft sonlar yig'indisi: ", (1 + an) * (an - 1) / 4)
print("1 dan ngacha juft sonlar yig'indisi") n = int(input('n sonini kiriting ')) if n % 2 == 0: print((2 + n) * n / 4) else: print((1 + n) * (n - 1) / 4)
karra = input('Qaysi sonni karrasi kerak:') if karra == '2': for son in range (1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) elif karra == '3': for son in range(1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) elif karra == '4': for son in range(1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) elif karra == '5': for son in range(1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) elif karra == '6': for son in range(1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) elif karra == '7': for son in range(1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) elif karra == '8': for son in range(1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) elif karra == '9': for son in range(1, 11): natija = int(karra) * int(son) print("{} x {} = {}".format(karra, son, natija)) else: print('2 dan 9 gacha son kiriting: ') Shu kodlarni ishlatib ko'rila.
n = int(input("sonni kiriting: ")) k=0 if n>0 : for son in range(1, n): if son%2==0 : k += son print(son, k) print("Kiritilgan songacha bolgan juft sonlarning yig`indisi {} ga teng".format(k))
@@BotirZiyatov bunday kod yozib iwlatsak juda katta sonlarni hisoblashda komp qiynalib qolyapti aaaaaa sootvetstvenno agar bot yozadigan bolsak bunaqa holatlarda vaqt kop talab qiladi buni tushinmagan odam qotip qolyaptiku deydii?
n = int(input("Musbat butun son kiriting: n=")) summ = 0 for juft in range(1,n): if(juft % 2 == 0): summ += juft print("Juft sonlar yigindisi: summ=", summ)
for karra1 in range(1,10): for son1 in range(1,11): natija1 = karra1 * son1 print("{} * {} = {} ".format(karra1,son1,natija1)) print("-------------------")
print('1 dan n gacha bo\'lgan sonlarning juftlari yig\'indisini hisoblab beraman') son = int(input('Sonni kiriting: ')) summa = 0 for i in range(1, son): if i % 2 == 0: summa += i print('1 dan {} gacha bo\'lgan juft sonlar: {}'.format(son, summa))
print(" *******Topshiriq******* ") n = int(input("sonni kiriting: ")) juft = 0 toq = 0 for son in range(1, n): if (son % 2) == 0: juft += son else: toq += son print("1 dan {} gacha juft sonlar yig'indisi: {}".format(n, juft)) print("1 dan {} gacha toq sonlar yig'indisi: {}".format(n, toq))
@@BotirZiyatov Akajon Man endi python ni o'rganishni boshlagandim. Siz 3/4 chi darslarizda keltirgan Malumot turlari rasmi qaysi kitobdan? Man inglizchadan ancha xabarim bor, python bo'yicha qaysi kitoblarni tavsiya qilasiz? Python xaqida ko'pro malumotlarni Qaysi saytlardan olsam bo'ladi?
n=int(input("Biror n sonini kiriting: ")) sum=0 for m in range(1,n): if(m%2==0): sum+=m print(("1 dan {} gache bo'lgan sonlarning yig'indisi S={}").format(n,sum))
n = int(input("Ixtiyoriy butun son kiriting: ")) natija = 0 for son in range(n): if son % 2==0: natija += son print( "1 dan {} gacha bo'lgan juft sonlarning yig'indisi = {} ga teng".format(n, natija))
a = input('Ustoz uchun raxmat deb yozing: ') if a.casefold() =='raxmat': print(f'Ustoz sizga katta {a.upper()}') else: print('Xatolik bor! Qaytadan urinib "raxmat" deb yozing! ')
n = input("oraliqni tanlang: ") n.isdigit() n = int(n) a = 0 for son in range(1, n+1): if son % 2 == 0: a = a + son print("tanlagan oralig'imizdagi juft sonlar yig'indisi = ", a)
# 1 dan n songacha juft sonlar yig`indisi n = int(input('1 dan qaysi songacha juft sonlar olinsin: ')) natija = 0 for son in range(1, n): if son % 2 == 0: natija += son print('1 dan', n, 'gacha bo`lgan juft sonlar yig`indisi ', natija, 'ga teng')
son = int(input("ixtiyoriy sonni kiriting: ")) qiymat = 0 for i in range(1,son+1): if i % 2 == 0: qiymat+=i print('1 dan {} gacha bolgan juft sonlar yigindisi {} ga teng'.format(son,qiymat))
a = int(input('Qaysi songacha juft sonlar yig`indisi kerak: ')) b = 0 if a % 2 == 0: for c in range(0, a, 2): b += c print ('Natija: ', b) else: for c in range(0, a+1, 2): b += c print ('Natija: ', b)
for karra in range(1, 10): print("") print(' {} karra JADVALI'.format(karra)) for kar in range(1, 11): kopaytma = karra * kar print(' {} x {} = {}'.format(karra, kar, kopaytma))
rahmat sizga ancha narsalarni o'rganyapmiz shuncha mehnat qilib tekinga dars chiqaryapsiz
n=int(input("ixtiyoriy butun sonni kiriting - "))
t=0
for son in range(2,n+1):
k=son%2
if k==0:
t+=son
else :
continue
print("yig'indi - ", t)
Яхши натижа 👏
xato chiqyapti
@@BotirZiyatov
a = int(input('Son kirting'))
s=0
for i in range(2, a, 2):
s+=i
print(s)
qisqa va xatosiz
xato
raxmat, ishlarizga omad "ustoz" 😀.iloji busa pythonda sayt yaratishni ham urgating
Ha, juda yaxshi bo'lar edi..
boshlangich=int(input("Boshlang'ich juft sonni kiriting:"))
oxirgi=int(input("Oxirgi juft sonni kiriting:"))
qatnashgan_sonlar_soni=(oxirgi-boshlangich+2)/2
jami=(boshlangich+oxirgi)/2*qatnashgan_sonlar_soni
print("n ta ketma-ket kelgan juft sonlar yigindisi:",jami)
+
+
a = print("Juft Sonlarni ko'rsatuvchi dastur")
for son in range(1, 19):
juft_s = 2*son
print(juft_s)
Ajoyib video. Kanal zo'r. Charchamang
n = int(input("Son kiriting: "))
yigindi = 0
for son in range(2, n+1):
juft = son % 2
if juft == 0:
yigindi += son
else:
continue
print("Yegindi: ", yigindi)
Assalomu alaykum aka rahmat darslar zoʻr ekan rahmat omadizni bersin
ishizga omad aka
Darslar uchun katta raxmat ustoz
Raxmat yaxshi videorolik boʻlibdi yaratgan barchamizdan rozi boʻlsin
while True:
a= input("enter: ")
b=0
for x in range(int(a)):
if x%2==0:
b += x
print(f"1 dan {a} gacha juft sonlar yigindisi {b} ga teng.")
// dastur ishlash vaqtida 2 va undan ortiq amallarni bajarish mumkin
for karra in range(1,11):
print(karra, 'karra ')
for son in range(1,11):
natija=karra*son
print("{}*{}={}".format(karra, son, natija))
zor
Zor oka 👍👍👍👍👍👍 omad
a = print("Juft Sonlarni ko'rsatuvchi dastur")
for son in range(1, 19):
juft_s = 2*son
n = int(input('N ni kiriting >>> '))
hisoblovchi = 0
for son in range(0,n+1,2):
hisoblovchi+=son
print(hisoblovchi)
a = int(input('Son kiriting: '))
son = 2
for n in range(0, a, 2):
natija = son+n
print(f'Qale: {son} + {n} = {natija} ')
👍
n = input("Biror musbat son kiriting: ")
natija = 0
for son in range(int(n)):
if son % 2 == 0:
natija += son
print("1 dan", n, "gacha bo'lgan juft sonlarning yig'indisi ",natija, "ga teng.")
n=int(input("Sonni kiriting: "))
natija=0
for son in range(0,n+2):
if son%2==0:
natija+=son
print("2 dan",n," gacha bo`lgan juft sonlar yig`indisi",natija,"ga teng")
Яхши натижа. факат 0 дан бошлаш шарт эмас бу шунчаки битта ортиқча қадам.
@@BotirZiyatov рахмат устоз этибор учун!(устозни ёшини фарки йук экан)
@@mikomix1542 Siz necha yoshdasiz?
natija + = son
Хато деяптику
Raxmat
a=int(input())
natija=0
for son in range(0,a+1):
if son%2==0:
natija+=son
print(son,' + ',end=' ')
print(" = " ,natija)
Zo'r
a=0
n=int(input('n='))
for x in range(1,n):
if x%2==0:
a+=x
print(a)
a=int(input("a="))
y=0
for b in range(1,a):
if b%2==0:
y+=b
else:
continue
print("y=",y)
Oka raxmat
son = 0
for x in range(0 , 101):
son = son + 2
print(son)
son = int(input('son kiriting: '))
yigindi = 0
for raqam in range(0, son + 1, 2):
yigindi += raqam
print(yigindi)
boshlangich=int(input("Boshlang'ich juft sonni kiriting:"))
oxirgi=int(input("Oxirgi juft sonni kiriting:"))
qatnashgan_sonlar_soni=(oxirgi-boshlangich+2)/2
jami=(boshlangich+oxirgi)/2*qatnashgan_sonlar_soni
print("n ta ketma-ket kelgan juft sonlar yigindisi:",jami)
Ko'ringchi
sonlar = 0
n = int(input())
for juft in range(0,n,2):
natija = sonlar + juft
print('{} + {} = {}'.format(sonlar,juft,natija))
n = int(input("Sonni kiriting: "))
s=0
for i in range(2, n+1, 2):
s+=i
print(s)
Яхши натижа
@@BotirZiyatov ustoz ma`lum bir songacha demaysizmiye ) man N gacha qanday bulikan deb uylabman
1 soat urindim uziyam :)
Man umuman tushunmadim lekin oka tushuntirb berin
@@azamataxmatqulov5334 Assalomu alaykum! Birinchi navbatda siz n (ixtiyoriy son) ni foydalanuvchidan input orqali qabul qilib olishingiz kerak. Keyin for sikli orqali uni 2 (yaʼni birinchi juft son)dan to n gacha (juft boʻlishi uchun oraliq interval 2 bilan) aylantirasiz. Boshida s (raqamlar yigʻindisi) nolga teng boʻladi. Keyin for sikli avtomatik ravishda s ga hosil boʻlgan i (n gacha boʻlgan sonlar)ni birma-bir qoʻshib beradi. s+=i degani s = s + i, yaʼni har doim yangi hosil boʻlgan s ga i ni qoʻshib boradi. Oxirida esa hosil boʻlgan natija (s)ni print qilib qoʻyasiz!
#karra jadvali tuzish
for son in range(1,10):
for karra in range(1,11):
natija = son * karra
print("{} x {} = {}".format(son,karra,natija))
n = int(input('Son kiriting: '))
s = 0
for son in range(0, n + 1, 2):
s += son
print(s)
Яхши натижа 👏
@@BotirZiyatov += ishora qanday holarda ishlatiladi
# topshiriq
son=input("Biror butun son kiriting: ")
son=int(son)
summa=0
for raqam in range(1,son):
if raqam%2==0:
summa+=raqam
print("{} gacha bo`lgan juft sonlar yig`indisi {} ga teng".format(son, summa))
karra = input("Nechi karrani hosil qilmoqchisiz ")
if karra.isdigit():
karra = int(karra)
for son in range(1,11):
natija = karra*son
print('{} * {} = {}'.format(karra,son,natija))
else :
print("Son kiritish lozi")
n=int(input('Sonni kiriting : '))
x=0
for son in range(1,n):
if son % 2 ==0:
x=x+son
print(x)
n= int(input("Istalgan sonni kiriting"))
for son in range(2,n+1,2):
if n%2==0:
natija=(n+2)/2*(n/2)
print(natija)
else:
natija=(n-1+2)/2*((n-1)/2)
print(natija)
1 dan 95870467 gacha bo`lgan toq sonlar yig`indisi 2297786562764289 ga teng. Bu natijani chiqarish uchun kompyuter ozgina qiynaldi)))
rostan ham
# 1dan n gacha bo'lgan butun sonlar yig'indisini hisoblaymiz
n=int(input("biror musbat butun son kiriting:"))
if n%2==0:
sum=0
for son in range(2,n+1):
if son%2==0:
sum+=son
elif n%2==1:
sum=0
for son in range(2,n):
if son%2==0:
sum+=son
else:
print("biror musbat son kiriting:")
print(sum)
n = int(input("n sonini kiriting: "))
yegindi = 0
for son in range(2,n+1,2):
yegindi += son
n=int(input('qiymat kiriting: '))
yechim=0
for yigindi in range(1, n+1):
if yigindi % 2==0:
yechim +=yigindi
print('yigindi= ', yechim)
Zorrr
b=0
n=int(input("n="))
for a in range(1,n):
if a%2==0:
b=a+b
print(b)
n=int(input())
yigindi=0
for i in range(1,n+1):
if i%2==0:
yigindi=yigindi+i
print(yigindi)
butun_son = int ( input ('butun sonni kiriting:'))
qiymat_oluvchi = 0
bolinma = butun_son % 2
if bolinma == 0 :
for son in range (2,butun_son):
bolinma2 = son % 2
if bolinma2 == 0:
qiymat_oluvchi += son
else :
continue
print ('2 dan {} gacha butun sonlar yigindisi {} ga teng '.format(butun_son,qiymat_oluvchi))
else:
print('iltimos butun son kititing')
n = int(input('Son kiriting:'))
sum = 0
for i in range(1, n + 1):
if i % 2 == 0:
sum += i
print('Juft sonlar yig`indisi', sum)
#topshiriq_9
n = int(input("Sondi kiriting "))
for son in range(2,n+1):
k = son % 2
if k == 0:
print(son)
😎🤓🤓🤓
karra = 9
for son in range(1, 11):
print("9 x ", son, "=", son * karra)
osonroq chiqarish karrani
Assalomu alaykum Botir Ziyatov
n = int(input('N sonini kiirting: '))
natija = 0
for son in range(2, n+1):
if son % 2 == 0:
natija += son
print(natija)
n = int(input("n Soniga qiymat bering: "))
yigindi = 0
for son in range(1, n):
if son % 2 == 0:
yigindi = yigindi + son
print(yigindi)
Swm = 0
n = int(input('Enter the number: '))
for i in range(2,n,2):
Swm+=i
print(Swm)
Vazifa:
summa = 0
for son in range(1, 11):
if son % 2 == 0:
summa += son
print(summa)
zo'r
n = int(input())
s = 0
for son in range(1,n+1):
if son % 2 == 0 :
s=s+son
print(s)
son = input("Sonni kiriting:")
summa = 0
kupaytma = 1
if son.isdigit():
for item in range(1,int(son)+1):
summa += item
print("1 dan",son ,"gacha bo'lgan sonlar yig'indisi =",summa)
else:
print("Faqat son kiriting ...")
n=int(input("Sonni kiriting: "))
A=0
for i in range(0,n,2):
A+=i
print(A)
a1 = 2
d = 2
an = int(input("So'nggi musbat sonni kiriting: "))
n = int(an / 2)
if an % 2 == 0:
print("2 dan " + str(an) + " gacha bo'lgan juft sonlar yig'indisi: ", (2 + an) * an / 4)
elif an % 2 == 1:
print("2 dan " + str(an) + " gacha bo'lgan juft sonlar yig'indisi: ", (1 + an) * (an - 1) / 4)
menimcha katta sonlar bilan ishlaganda shunday qilgan maqulroq 7 8 xonali sonlarda for sekin ishlashni boshlaydi
@Atkham AkhmedjanovRahmat
a = int(input("Son kiriting: "))
c = 0
for i in range(a):
if i%2==0:
c +=i
print("------Yig'indisi-----")
print(c)
topshiriqni bajarishda qiynaldim shuning uchun 10-darsga qarab qildil:
son=2
n=int(input("biror sonni kiriting:"))
while son
n = int(input("Nni kiriting: "))
a = 0
if n
n = int(input('Ixtiyoriy juft son kiriting: '))
s=0
for x in range(2,n,2):
s=s + x
print(s)
print("1 dan ngacha juft sonlar yig'indisi")
n = int(input('n sonini kiriting '))
if n % 2 == 0:
print((2 + n) * n / 4)
else:
print((1 + n) * (n - 1) / 4)
Agar N, M natural sonlar bo'lasa , raqmlarining yig'indisi M ga teng bo'lgan N dan kichik natural sonlarni natural sonlarni aniqlaovchi dastur tuzing.
Assalomu alaykum
n=int(input("Istalgan son kiriting: "))
print(sum(range(2,n+1,2)))
n = int(input('n = '))
sum = 0
for i in range(2, n, 2):
sum += i
print('sum = {0}'.format(sum))
karra = input('Qaysi sonni karrasi kerak:')
if karra == '2':
for son in range (1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
elif karra == '3':
for son in range(1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
elif karra == '4':
for son in range(1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
elif karra == '5':
for son in range(1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
elif karra == '6':
for son in range(1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
elif karra == '7':
for son in range(1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
elif karra == '8':
for son in range(1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
elif karra == '9':
for son in range(1, 11):
natija = int(karra) * int(son)
print("{} x {} = {}".format(karra, son, natija))
else:
print('2 dan 9 gacha son kiriting: ')
Shu kodlarni ishlatib ko'rila.
from random import randint
n = randint(1,1000)
son = 2
qoshilma = 2
while son
n = int (input ("Enter number :"))
a = 0
n+=1
for i in range (n):
if i%2 == 0 :
a+=i
print (a)
n = int(input("sonni kiriting: "))
k=0
if n>0 :
for son in range(1, n):
if son%2==0 :
k += son
print(son, k)
print("Kiritilgan songacha bolgan juft sonlarning yig`indisi {} ga teng".format(k))
n = int(input("n="))
for son in range(1,n):
if son%2 == 0:
print(son)
oka if son%2 == 0: deganda shunda nimani hisoblayabsiz qandayligini tushunmadm
@@thisisfirdavs_r agar sonni 2 ga bolsang qoldiq 0 bosa degan shart bu
@@bahrom2101 rahmat aka
n=int(input("n="))
sum=0
for i in range (1,n+1):
if i%2==0 :
sum=sum+i
print(f" 1 dan {n} gacha bo'lgan musbat sonlar yig'indisi {sum} ga teng!")
👍👏
son = int(input())
x = 0
for count in range(1,son+1):
x+=count
count+=1
print(x)
n=int(input("Sonni kiriting: "))
natija=0
for son in range(0,n):
if son%2==0:
natija+=son
print(natija)
Яхши. факат 0 дан бошлаш шарт эмас сабаби ортиқча бир марта айланиш бўлади.
Shu holatda javob qaytarayotganda nega har bir qadamni chiqarib ketyapti ..
@@BotirZiyatov bunday kod yozib iwlatsak juda katta sonlarni hisoblashda komp qiynalib qolyapti
aaaaaa sootvetstvenno agar bot yozadigan bolsak bunaqa holatlarda vaqt kop talab qiladi buni tushinmagan odam qotip qolyaptiku deydii?
n = int(input("Musbat butun son kiriting: n="))
summ = 0
for juft in range(1,n):
if(juft % 2 == 0):
summ += juft
print("Juft sonlar yigindisi: summ=", summ)
Яхши натижа
@@BotirZiyatov Rahmat!!
n = int(input('Istalgan son kiriting - '))
nateja = 0
for son in range(2, n+1):
if son%2== 0 and n>=2:
nateja+= son
print(nateja)
n ga 8 kiritiganmda
2
6
12
20
chiqyapti faqat ohiridagini uzini ciqarish mumknmi
n=int(input('sonni kiriting:'))
for son in range(1,n):
if son%2==0:
print(son)
for karra1 in range(1,10):
for son1 in range(1,11):
natija1 = karra1 * son1
print("{} * {} = {} ".format(karra1,son1,natija1))
print("-------------------")
n = 61
for son in range(1,n)
son = 2×son
print("1 dan n gacha bo'lgan son:",son)
b = 0
a = int(input('Son kiriting: '))
for son in range(1, a):
if(son % 2 == 0):
b = b + son
print(b)
n=input('n=')
n=int(n)
s=0
from math inport*
for i in range(n):
if i%2==0 :
s+=i
print('s='.s)
son = int(input("1 dan nechgacha qo'shilishini hohlaysiz"))
for son in range(1, son):
teng = son + son
print('{} + {} = {} '.format(son, son, teng))
#son = int(input('sonni kiriting: '))
#summa = 0
#if son > 0:
# for son2 in range(0,son):
# if son2 % 2 == 0:
# summa += son2
#print(summa)
print('1 dan n gacha bo\'lgan sonlarning juftlari yig\'indisini hisoblab beraman')
son = int(input('Sonni kiriting: '))
summa = 0
for i in range(1, son):
if i % 2 == 0:
summa += i
print('1 dan {} gacha bo\'lgan juft sonlar: {}'.format(son, summa))
#topshiriq 1 dan n gacha juft sonlar yigindisi
son=int(input('n ning qiymatini kirgizing: '))
yechim=son*son+son
print('javob: ',yechim)
son = range(2,100,2)
print(sum(son))
Assalomu alaykum.
Iltimos c++ tilidan ham darslarni kanalingizga joylashtirsangiz xursand bo'lar edim.
n = input(' son kiriting: ')
c = 0
for a in range(int(n)):
if a % 2 == 0 :
c+=a
print(c)
print("
*******Topshiriq*******
")
n = int(input("sonni kiriting: "))
juft = 0
toq = 0
for son in range(1, n):
if (son % 2) == 0:
juft += son
else:
toq += son
print("1 dan {} gacha juft sonlar yig'indisi: {}".format(n, juft))
print("1 dan {} gacha toq sonlar yig'indisi: {}".format(n, toq))
As Salam aleykum. Botir aka, zo'r darslar qilyapsiz, Alloh rozi bo'lsin. Aka sizga darslar bo'yicha savolni Qayerdan bersak bo'ladi?
Шу жойда бемалол саволларизни беришиз мумкин
@@BotirZiyatov Akajon Man endi python ni o'rganishni boshlagandim. Siz 3/4 chi darslarizda keltirgan Malumot turlari rasmi qaysi kitobdan? Man inglizchadan ancha xabarim bor, python bo'yicha qaysi kitoblarni tavsiya qilasiz? Python xaqida ko'pro malumotlarni Qaysi saytlardan olsam bo'ladi?
@@raydeenshorts www.tutorialspoint.com/python/index.htm
www.w3schools.com/python/
@@BotirZiyatov от души Ака) sog' bo'ling, rahmat :) Darslar kutib qolamiz yana aka
@@BotirZiyatov As Salamu Aleykum. Botir aka siz online dars berasizmi?
n=int(input("Biror n sonini kiriting: "))
sum=0
for m in range(1,n):
if(m%2==0):
sum+=m
print(("1 dan {} gache bo'lgan sonlarning yig'indisi S={}").format(n,sum))
for x in range(0,100000,2):
print(x)
n = int(input("Ixtiyoriy butun son kiriting: "))
natija = 0
for son in range(n):
if son % 2==0:
natija += son
print( "1 dan {} gacha bo'lgan juft sonlarning yig'indisi = {} ga teng".format(n, natija))
Bu dasturni yozgandan keyin qanday qilib ishlatamiz.
a = input('Ustoz uchun raxmat deb yozing: ')
if a.casefold() =='raxmat':
print(f'Ustoz sizga katta {a.upper()}')
else:
print('Xatolik bor!
Qaytadan urinib "raxmat" deb yozing! ')
n = input("oraliqni tanlang: ")
n.isdigit()
n = int(n)
a = 0
for son in range(1, n+1):
if son % 2 == 0:
a = a + son
print("tanlagan oralig'imizdagi juft sonlar yig'indisi = ", a)
n=int(input('n ning qiymatini kiriting: '))
yigindi=0
for son in range(1,n):
if son%2==0:
yigindi+=son
print(yigindi)
# 1 dan n songacha juft sonlar yig`indisi
n = int(input('1 dan qaysi songacha juft sonlar olinsin: '))
natija = 0
for son in range(1, n):
if son % 2 == 0:
natija += son
print('1 dan', n, 'gacha bo`lgan juft sonlar yig`indisi ', natija, 'ga teng')
son = int(input("ixtiyoriy sonni kiriting: "))
qiymat = 0
for i in range(1,son+1):
if i % 2 == 0:
qiymat+=i
print('1 dan {} gacha bolgan juft sonlar yigindisi {} ga teng'.format(son,qiymat))
Яхши натижа 👏
@@BotirZiyatov Raxmat aka
a = int(input('Qaysi songacha juft sonlar yig`indisi kerak: '))
b = 0
if a % 2 == 0:
for c in range(0, a, 2):
b += c
print ('Natija: ', b)
else:
for c in range(0, a+1, 2):
b += c
print ('Natija: ', b)
assalomu alaykum faqat oxirgi natija emas har bir juft sonni qo'shgani ham ketma-ket ko'rinib qolyapti shunga nima qilish kerak?
n = int(input())
print(n // 2 * (n // 2 + 1))
# 1 dan n gacha juft sonlar yigindisi
n=float(input('n sonini kiriting: '))
if n%1==0:
natija=0
if n
for karra in range(1, 10):
print("")
print(' {} karra JADVALI'.format(karra))
for kar in range(1, 11):
kopaytma = karra * kar
print(' {} x {} = {}'.format(karra, kar, kopaytma))