karra=9 for son in range(1,11): natija=karra*son print("9x{}=".format(son),natija) men siz o'rgatishingizdan oldin shunday yozdim va bu ishladi. bu menimas sizning yutug'ingiz!!! = RESTART: C:/Users/Muzaffar/AppData/Local/Programs/Python/Python38/9_dars_karra.py 9x1= 9 9x2= 18 9x3= 27 9x4= 36 9x5= 45 9x6= 54 9x7= 63 9x8= 72 9x9= 81 9x10= 90 >>> rahmat Botir Ustoz
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.")
# 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))
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("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")
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")
@@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!
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)
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 ...")
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)
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))
for karra1 in range(1,10): for son1 in range(1,11): natija1 = karra1 * son1 print("{} * {} = {} ".format(karra1,son1,natija1)) print("-------------------")
# 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 = 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)
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)
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("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 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))
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))
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.
salom, menimcham sizda xato bor, siz satr tashamadingiz, hamdesa range(1,s) da "()" ichida katta S boladi, print kichik harflar biln yoziladi. if degan soz ham kichkina i bilan yoziladi
@@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)
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))
# 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')
karra=9
for son in range(1,11):
natija=karra*son
print("9x{}=".format(son),natija) men siz o'rgatishingizdan oldin shunday yozdim va bu ishladi. bu menimas sizning yutug'ingiz!!!
= RESTART: C:/Users/Muzaffar/AppData/Local/Programs/Python/Python38/9_dars_karra.py
9x1= 9
9x2= 18
9x3= 27
9x4= 36
9x5= 45
9x6= 54
9x7= 63
9x8= 72
9x9= 81
9x10= 90
>>> rahmat Botir Ustoz
Рахмат Зўр 👍
rahmat sizga ancha narsalarni o'rganyapmiz shuncha mehnat qilib tekinga dars chiqaryapsiz
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)
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
Ajoyib video. Kanal zo'r. Charchamang
Assalomu alaykum aka rahmat darslar zoʻr ekan rahmat omadizni bersin
Darslar uchun katta raxmat ustoz
Raxmat yaxshi videorolik boʻlibdi yaratgan barchamizdan rozi boʻlsin
ishizga omad aka
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)
Zor oka 👍👍👍👍👍👍 omad
n = int(input('N ni kiriting >>> '))
hisoblovchi = 0
for son in range(0,n+1,2):
hisoblovchi+=son
print(hisoblovchi)
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
a = print("Juft Sonlarni ko'rsatuvchi dastur")
for son in range(1, 19):
juft_s = 2*son
a = int(input('Son kiriting: '))
son = 2
for n in range(0, a, 2):
natija = son+n
print(f'Qale: {son} + {n} = {natija} ')
👍
Raxmat
son = int(input('son kiriting: '))
yigindi = 0
for raqam in range(0, son + 1, 2):
yigindi += raqam
print(yigindi)
Oka raxmat
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.")
#karra jadvali tuzish
for son in range(1,10):
for karra in range(1,11):
natija = son * karra
print("{} x {} = {}".format(son,karra,natija))
Ko'ringchi
sonlar = 0
n = int(input())
for juft in range(0,n,2):
natija = sonlar + juft
print('{} + {} = {}'.format(sonlar,juft,natija))
a=0
n=int(input('n='))
for x in range(1,n):
if x%2==0:
a+=x
print(a)
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
#topshiriq_9
n = int(input("Sondi kiriting "))
for son in range(2,n+1):
k = son % 2
if k == 0:
print(son)
😎🤓🤓🤓
a=int(input("a="))
y=0
for b in range(1,a):
if b%2==0:
y+=b
else:
continue
print("y=",y)
son = 0
for x in range(0 , 101):
son = son + 2
print(son)
# 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))
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())
yigindi=0
for i in range(1,n+1):
if i%2==0:
yigindi=yigindi+i
print(yigindi)
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
Хато деяптику
n = int(input('Son kiriting: '))
s = 0
for son in range(0, n + 1, 2):
s += son
print(s)
Яхши натижа 👏
@@BotirZiyatov += ishora qanday holarda ishlatiladi
n = int(input("n sonini kiriting: "))
yegindi = 0
for son in range(2,n+1,2):
yegindi += son
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("n Soniga qiymat bering: "))
yigindi = 0
for son in range(1, n):
if son % 2 == 0:
yigindi = yigindi + son
print(yigindi)
1 dan 95870467 gacha bo`lgan toq sonlar yig`indisi 2297786562764289 ga teng. Bu natijani chiqarish uchun kompyuter ozgina qiynaldi)))
rostan ham
karra = 9
for son in range(1, 11):
print("9 x ", son, "=", son * karra)
osonroq chiqarish karrani
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)
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!
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)
Zorrr
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)
n=int(input('Sonni kiriting : '))
x=0
for son in range(1,n):
if son % 2 ==0:
x=x+son
print(x)
topshiriqni bajarishda qiynaldim shuning uchun 10-darsga qarab qildil:
son=2
n=int(input("biror sonni kiriting:"))
while son
n=int(input("Sonni kiriting: "))
A=0
for i in range(0,n,2):
A+=i
print(A)
zo'r
n = int(input('Ixtiyoriy juft son kiriting: '))
s=0
for x in range(2,n,2):
s=s + x
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 ...")
Assalomu alaykum
n=int(input("Istalgan son kiriting: "))
print(sum(range(2,n+1,2)))
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)
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("Nni kiriting: "))
a = 0
if n
n = 61
for son in range(1,n)
son = 2×son
print("1 dan n gacha bo'lgan son:",son)
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
b=0
n=int(input("n="))
for a in range(1,n):
if a%2==0:
b=a+b
print(b)
#topshiriq 1 dan n gacha juft sonlar yigindisi
son=int(input('n ning qiymatini kirgizing: '))
yechim=son*son+son
print('javob: ',yechim)
n = int(input('n = '))
sum = 0
for i in range(2, n, 2):
sum += i
print('sum = {0}'.format(sum))
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('sonni kiriting:'))
for son in range(1,n):
if son%2==0:
print(son)
n=int(input('qiymat kiriting: '))
yechim=0
for yigindi in range(1, n+1):
if yigindi % 2==0:
yechim +=yigindi
print('yigindi= ', yechim)
son = int(input())
x = 0
for count in range(1,son+1):
x+=count
count+=1
print(x)
for karra1 in range(1,10):
for son1 in range(1,11):
natija1 = karra1 * son1
print("{} * {} = {} ".format(karra1,son1,natija1))
print("-------------------")
b = 0
a = int(input('Son kiriting: '))
for son in range(1, a):
if(son % 2 == 0):
b = b + son
print(b)
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.
son = range(2,100,2)
print(sum(son))
# 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 ning qiymatini kiriting: '))
yigindi=0
for son in range(1,n):
if son%2==0:
yigindi+=son
print(yigindi)
n = int(input())
s = 0
for son in range(1,n+1):
if son % 2 == 0 :
s=s+son
print(s)
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="))
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!")
from random import randint
n = randint(1,1000)
son = 2
qoshilma = 2
while son
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
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("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))
#son = int(input('sonni kiriting: '))
#summa = 0
#if son > 0:
# for son2 in range(0,son):
# if son2 % 2 == 0:
# summa += son2
#print(summa)
for x in range(0,100000,2):
print(x)
👍👏
n = int(input())
print(n // 2 * (n // 2 + 1))
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))
n = input(' son kiriting: ')
c = 0
for a in range(int(n)):
if a % 2 == 0 :
c+=a
print(c)
son = int(input("1 dan nechgacha qo'shilishini hohlaysiz"))
for son in range(1, son):
teng = son + son
print('{} + {} = {} '.format(son, son, teng))
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))
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('n ni kiriting:'))
For n in range (2,n,2):
Print(n)
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.
S=int(input('son kiriting'))
for k in range(1,s):
If k%2==0:
Print(k)
salom, menimcham sizda xato bor, siz satr tashamadingiz, hamdesa range(1,s) da "()" ichida katta S boladi, print kichik harflar biln yoziladi. if degan soz ham kichkina i bilan yoziladi
n = input("N sonni kiriting=")
m=int(n)
sum=0
for son in range(1,m):
if son%2==0:
sum=sum+son
print("juft sonlar yig'indisi {}".format(sum))
n = int (input ("Enter number :"))
a = 0
n+=1
for i in range (n):
if i%2 == 0 :
a+=i
print (a)
a = int(input("Sonni Kiriting: "))
t = 0
for son in range(2,a):
k=son%2
if k==0:
t+=son
else:
print("Yigindisi = ", t)
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?
for son in range(1, 51):
print(2*son)
Shunda chiqadi
a = int(input('a = '))
n = 0
for i in range(1, a):
if i%2 == 0:
n += i
print(n)
n = int(input("Unli sonlar yozing : "))
for son in range(1,n+1):
if(son %2 == 0):
print(son)
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!!
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))
n = int(input())
for n in range (1,n):
x = n*2
print(x, end='+')
istalgan soningizni chiqarip beradi
😁😁
a = int(input("Son kiriting: "))
c = 0
for i in range(a):
if i%2==0:
c +=i
print("------Yig'indisi-----")
print(c)
# 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')