حلقه تکرار for پایتون مقدماتی استاد جادی - قسمت یازده، در پایتون

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 38

  • @asalzogi-s5z
    @asalzogi-s5z 3 дня назад

    thanks you are the best:)

  • @Dibarad9362
    @Dibarad9362 5 дней назад

    Thanks!

  • @mahyarmahdavi3151
    @mahyarmahdavi3151 Год назад +22

    a = input('enter yor grade: ')
    jam=0
    count = 0
    while int(a) != -1:
    jam = jam + int(a)
    count = count +1
    a = input('enter your grade: ')
    print('The AVERAGE is ' , jam/count)

  • @ali_tarfand-qy7jl
    @ali_tarfand-qy7jl 2 дня назад

    Perfect❤❤

  • @rahatorabi5761
    @rahatorabi5761 2 месяца назад

    input1 = input('Type your number (or -1 to stop): ')
    adad = int(input1)
    sum = 0
    count = 0
    while adad != -1:
    sum += adad
    count += 1
    input2 = input("Type your number (or -1 to stop): ")
    adad = int(input2)
    if adad == 0:
    break
    if count != 0:
    print('Average:', sum / count)
    else:
    print('Keine Zahlen eingegeben.')

  • @the_little_moon
    @the_little_moon 3 месяца назад

    num=int(input('type your number: '))
    sum=0
    count=0
    while num!=-1:
    sum=sum+num
    count=count+1
    num=int(input('type your number: '))
    print('average', sum/count)

  • @Spiritwithnosoul
    @Spiritwithnosoul 3 месяца назад

    count = 0
    jam = 0
    x = int(input('enter your number: '))
    while int(x) != -1:
    count = count + 1
    print ("count= ", count)
    jam = jam + x
    print ('jam= ', jam)
    x = int(input('type your number: '))
    average = jam / count
    if x == -1:
    break
    print ('jam= ', jam)
    print ('count= ', count)
    print ('average= ',average)

  • @fatemehajkazmi5581
    @fatemehajkazmi5581 2 года назад +9

    استاد کاش حل تمرین رو هم میزاشتین

  • @soroushk2172
    @soroushk2172 Месяц назад

    Con = 0
    AVG = 0
    Sum = 0
    Num = 0
    while Num != -1:
    Num = int (input ('Pls Enter Your Poin : '))
    Con +=1
    Sum = Sum + Num
    if Con == 10:
    break
    AVG = Sum / Con
    print ('Cont Your Points is : ' , Con)
    print ('Your Points Avarage is :', AVG)

  • @زهرایوسفی-ف7ض
    @زهرایوسفی-ف7ض 3 месяца назад

    sum=0
    count=0
    addad=input("addad mad nazar khod ra vared konid:")
    number=int(addad)
    while number!=-1:
    sum=sum+number
    print(sum)
    count=count+1
    print(count)
    addad=input("addad mad nazar khod ra vared konid:")
    number=int(addad)
    avrage=sum/count
    print('miangin ta in lahze barabar ba=',avrage,'mibashad')

  • @fatemeheslaminasab
    @fatemeheslaminasab Год назад +3

    Count = 0
    Jam = 0
    Adad = int(input('enter your numnbers:'))
    while Adad != -1:
    Jam = Jam + Adad
    Count = Count +1
    print ('Sum is:',Jam)
    print ('Count is:',Count)
    Adad = int(input('enter your numnbers:'))
    Mean = Jam/Count
    print('Mean is:',Mean)

    • @marademedici9085
      @marademedici9085 Год назад

      جادی یجوری میگه که حس میکنی قراره خیلی پیچیده باشه

  • @samira-arabian-
    @samira-arabian- 10 месяцев назад

    i=0
    total=0
    count=0
    average=0
    while i != -1:
    i = float(input("Enter a number: "))
    total= i + total
    count= count+1
    print(total , count)
    if i == -1:
    break
    print("you enter -1 and -1 to stop")
    if count > 0:
    average = total / count
    print("The average of the entered numbers is:" , {average})

  • @ermiarazavi
    @ermiarazavi 3 месяца назад

    inp = int(input("Enter your numer : "))
    jam_adad = 0
    tedad_adad = 0
    while inp != -1:
    jam_adad = inp + jam_adad
    tedad_adad += 1
    inp = int(input("Enter your numer : "))
    miangin = jam_adad/tedad_adad
    print(miangin)

  • @leila_zibaei_jannati
    @leila_zibaei_jannati 3 месяца назад

    number = int(input("Enter a number: "))
    counter = 0
    Sum = 0
    while number != -1:
    print("Your number is: ", number)
    counter += 1
    Sum += number
    print("count: ", counter, "sum of numbers: ", Sum)
    number = int(input("Enter a number: "))
    average = Sum / counter
    print("average is: ", average)

  • @aedan2354
    @aedan2354 Год назад

    یعنی ما حلقه ( ; ; )for که توی زبانای دیگه هست رو نداریم. حلقه های معمولی از while و حلقه های رشته ای از for پس forech نداریم.

  • @Mehdi_dehghani
    @Mehdi_dehghani 5 месяцев назад

    Very good 💯

  • @amirrezaebrahimi6410
    @amirrezaebrahimi6410 9 месяцев назад +1

    javab tamrin ba kami taghirat dar daryaft javab
    print('!!Hello!!')
    tedad = 0
    jam = 0
    a = int(input('please enter a number for average Measurement accuracy (1 for round sum average And 2 for exact number average(other numbers will be rounded)): '))
    number = int(input('enter a number: '))
    while int((number != -1)):
    tedad = tedad + 1
    jam = jam + number
    number = int(input( 'enter a number: ' ))
    if (tedad > 10):
    if (a == 1):
    print( 'avrage' , '=' , jam // tedad )
    if (a == 2):
    print( 'average' , '=' , jam / tedad )
    else:
    break
    print( 'average' , '=' , jam // tedad )

    • @hosseinansari4380
      @hosseinansari4380 9 месяцев назад

      سلام شما میدونید چطور میشه دیباگ رو تو خود کنسول وی اس کد اجرا کرد مثل تو کلیپ بجای اینکه بره تو ترمینال وی اس کد دی باگ کنه؟

  • @Heyo__1905
    @Heyo__1905 2 месяца назад

    چرا مستقیما نمیگیم مثلا یک تا صد رو پرینت کن میایم کارو بزرگش میکنیم for میاریم😭؟

  • @alinouri2434
    @alinouri2434 7 месяцев назад

    sum = 0
    number = 0
    count = 0
    while number != -1:
    number = float(input('Enter your number: '))
    sum = sum + number
    print(sum)
    if number == -1:
    sum = sum - (-1)
    average = sum / count
    else:
    count = count + 1
    average = sum / count

    print(average)
    with for:
    count1 = 0
    sum = 0
    m = int(input("Enter the itiration number: "))
    for number in range(0, m):
    number = float(input('Enter your number: '))
    count1 = count1 + 1
    sum = sum + number
    #print(sum)
    if number == -1:
    break
    average = sum / count1
    print(average)

  • @Solikzmy1
    @Solikzmy1 4 месяца назад

    Jadi best

  • @aminmoon8106
    @aminmoon8106 2 года назад +1

    هر موقع خواستم یه زبان برنامه نویسی شروع کنم قدم اولم این بود که ببینم hello world
    چطوری چاپ کنم روی نمایشگر قدم بعدی نوشتن
    For
    بود!!!!!!!!!😂😂😂😂

  • @bluerose7777
    @bluerose7777 7 месяцев назад

    thanks Jadi

  • @kuorosh09
    @kuorosh09 Год назад +1

    x = 0
    y = 0
    soval = input ('adadet chie?')
    soval = int (soval)
    while soval != -1:
    x = x + soval
    print (y)
    y = y + 1
    soval = input ('adadet chie?')
    soval = int (soval)
    if soval == -1:
    print ('hah hah hah')
    print (x / y)

  • @mlkhjz
    @mlkhjz 11 месяцев назад

    count = 0
    sum = 0
    Adad = int(input('enter number: '))
    while Adad != -1:
    sum = sum + Adad
    count = count + 1
    mean = sum/count
    print ('Sum is: ',sum)
    print ('Count is: ',count)
    Adad = int(input('enter numnber:'))
    print ('Sum is: ',sum)
    print ('Count is: ',count)
    print('Mean is: ',mean)

    • @MohammadVasegh
      @MohammadVasegh 10 месяцев назад

      اینجا چرا باید دوباره Adad رو بنویسیم تو خط های اخر

  • @the_little_moon
    @the_little_moon 3 месяца назад

    none to second😍

  • @davoudhosseinikaklar
    @davoudhosseinikaklar Год назад

    counter = 0
    number = 0
    total=0
    while number != -1:
    number=input()
    number = int(number)
    total = total + number
    counter= counter + 1
    else:
    print((total-number)/counter)

  • @masoudghiaci5483
    @masoudghiaci5483 Год назад

    ❤❤

  • @VinDtj
    @VinDtj 3 месяца назад

    ❤❤❤❤❤❤

  • @VinDtj
    @VinDtj 3 месяца назад

    ❤❤❤❤❤❤❤