Python Program to find Sum of First N Even Numbers - In Hindi

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

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

  • @BABLISINGH-wf8dw
    @BABLISINGH-wf8dw 5 лет назад +16

    I am following all your videos step by step and enjoying learning python. Thanks for such awesome videos sir.

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

    n=int(input("Enter the no. you want to sum: "))
    i=1
    _sum=0
    while i

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

      wrong..this program is used to print sum of even numbers from 1 to n

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

    Sir aap really bahut hi achha samjhte hain.i am 101% satisfied in this video lac

  • @nirajkarki1850
    @nirajkarki1850 4 года назад

    hey ,this is my method for this program and it successfully run !
    n=int(input("enter the required even number u want to print"));
    i=1
    c=2*n
    sumx=0
    while (i

    • @codeitup
      @codeitup  4 года назад

      👍

    • @ShadabAnsari-dt4ni
      @ShadabAnsari-dt4ni 3 года назад

      @@codeitup sir can you please lil bit explain me this concept I didn't get specially 2*n

  • @vidhichauhan5042
    @vidhichauhan5042 4 года назад +1

    Sir you are a brilliant teacher... 👌👌👌👌👌👌👌

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

    very knowledgable video.

  • @rohittech5605
    @rohittech5605 2 года назад

    Aapka samjhane ka tarika bahut hi achha hain

  • @shivaniyadav3773
    @shivaniyadav3773 4 года назад +1

    Thank you so much sir .....It is very helpful 👍👍👍

    • @codeitup
      @codeitup  4 года назад +1

      Most welcome🙂

  • @chirag.2407
    @chirag.2407 3 года назад

    Thank you sir it is very helpful

    • @codeitup
      @codeitup  3 года назад

      Glad to help you Chirag!

  • @debarghyaadhikari5558
    @debarghyaadhikari5558 3 года назад +1

    Nice explanation

  • @radhikabinesh4363
    @radhikabinesh4363 4 года назад +1

    Thankyou sirrrrr veryyy much❤️.you taught very nicely

    • @codeitup
      @codeitup  4 года назад

      Glad to help you Radhika!

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

    This vedio is helpfull❤❤

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

    Very naice explanation like it very muck

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

      Thanks for liking!

  • @thetutorial7641
    @thetutorial7641 4 года назад

    Thanks sir... It's really helping me

    • @codeitup
      @codeitup  4 года назад

      Glad to help you dear😊

  • @akhilsharma4004
    @akhilsharma4004 4 года назад +4

    # program to find sum of first n eve numbers
    n=int(input("enter the value of n : "))
    i=2
    total=0
    while(i

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

    n=int(input("Enter a number:"));
    sum=0;
    i=2;
    while (i

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

    Nice video❤❤❤

  • @prayasnayak7136
    @prayasnayak7136 3 года назад +1

    Sir I am enjoying video very much!
    Thank you sir !
    Sir my nickname is also "ANAND"
    😃😃🥰🥰

    • @codeitup
      @codeitup  3 года назад

      Sunkar "ANAND" aa gaya !

  • @santoshyadav11111
    @santoshyadav11111 2 года назад

    Tq so much sir 🙏❤️‍🔥

    • @codeitup
      @codeitup  2 года назад

      Most welcome😊

  • @rekhabisht255
    @rekhabisht255 4 года назад +2

    Thank you sir

    • @codeitup
      @codeitup  4 года назад

      Thanks Rekha, if you really liked the content, share this channel with your friends..

  • @thetutorial7641
    @thetutorial7641 4 года назад

    Awesome sirji

  • @badanax7820
    @badanax7820 4 года назад +1

    V.Good ❤️

  • @Egoiistiic
    @Egoiistiic 3 года назад +2

    num = int(input("enter a number:
    "))
    sum=0
    i=1
    count=0
    while(count!=num):
    if i%2==0:
    sum+=i
    count+=1
    i+=1
    print("Sum of even number =",sum)
    # Correct code

  • @Anonymous-yx5nx
    @Anonymous-yx5nx Год назад +1

    Sir please differentiate between the use of i and count. Because in previous programs i was in the place of count. Please sir clear my doubt

  • @hardeeprajput7701
    @hardeeprajput7701 4 года назад +3

    Sir, what if i do like this
    Is this correct,
    n=int(input("how many even numbers u want to add : "));
    i=1;
    sum=0;
    while(i

    • @codeitup
      @codeitup  4 года назад +1

      Perfectly correct Hardeep ! Good !

  • @raniyamuthu
    @raniyamuthu 5 лет назад +6

    Sir in this count is there but in 1to n pgm no count why? Pls reply sir

    • @codeitup
      @codeitup  5 лет назад +5

      Becuase here we have to count total even numbers which we have to add. For example suppose user says that he has to add 5 even number then there must be some variable which will count that 5 numbers has been added. That's why count variable has been used here. :)

  • @Ankitkumar-qh6tx
    @Ankitkumar-qh6tx 4 года назад +3

    i=0;
    sum=0;
    while i

    • @codeitup
      @codeitup  4 года назад +1

      A single program may be written in n number of ways dear!

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

      n tends to infinity

  • @Jankibhandari78
    @Jankibhandari78 3 года назад +1

    Sir is program main count ko 1 bhi de sakte hain aur (count

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

    if you have a problem with this code, i have an alternate code for you, here it is.
    n=int(input("enter the number"));
    i=1;
    sum=0;
    while(i

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

      i=1
      count=0
      a=0
      n=int(input("enter first n even number "))
      while count

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

      @@vaibhavkumar9047 actually I want to say that my code will also works as yours.😁

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

    I did your task of "while" statement task's 10 questions but I want to know that if I want first n odd number's sum then what should I do?

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

      set i=3 and i=i+2

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

    sir how to perform this code by using for loop

  • @ShadabAnsari-dt4ni
    @ShadabAnsari-dt4ni 3 года назад +1

    n=int(input('Enter value please '))
    i=2
    sum=0
    count=0
    while (count

  • @faizalkhalifa9187
    @faizalkhalifa9187 3 года назад

    Thanks sir

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

    Can you please explain indentation in this. How many tabs should be used with if and why should i=i+1 be aligned with if

  • @kushagrarajput4661
    @kushagrarajput4661 3 года назад

    Sir agar ham
    n mein 2 ka multiply krke previous video wala method use kre to correct hoga kyaa......... Kyon ki 2 multiply karne se hm last wale even no. Pr pahunch jayenge aisa mujhe lagta h........
    Plzzzzz reply...... Aisa kr sakte h kya

  • @rohitbaikar1341
    @rohitbaikar1341 5 лет назад +3

    Write a program to display the addition of first 20 even number..

    • @codeitup
      @codeitup  5 лет назад +1

      count=0
      i=1
      sum=0
      while(count

    • @rohitbaikar1341
      @rohitbaikar1341 5 лет назад

      @@codeitup sir 3 error Aa rhe he..plz help

    • @codeitup
      @codeitup  5 лет назад

      @@rohitbaikar1341 Join my facebook group in the description link and share the snapshot.

  • @ashishbhuyan2799
    @ashishbhuyan2799 4 года назад

    Sir can we write this program as this
    i=2
    sum=0
    count=0
    while(count

    • @codeitup
      @codeitup  4 года назад

      The code needs some correction which I have done below:
      n=int(input("Enter Number of terms:"))
      i=2
      sum=0
      count=0
      while(count

  • @Cyberpunkxvii
    @Cyberpunkxvii 3 года назад

    Sir what would be the result if we didn't correct count

    • @codeitup
      @codeitup  3 года назад

      Run it and see !

  • @ManasRana-b8u
    @ManasRana-b8u 2 месяца назад

    sir hmne starting mein (count

  • @YogeshKarmawat-v1m
    @YogeshKarmawat-v1m 12 дней назад

    n=int(input("Enter your number:"))
    i=2
    sum=0
    while(i

  • @parad0x-21
    @parad0x-21 3 года назад

    phele apne sa try keya tha solve kar ne ka
    x = int(input("enter the number"))
    x= x*2
    sumx=0
    i=1
    while i

  • @aksharvikram5787
    @aksharvikram5787 5 лет назад +4

    Write a program to count the number of digits in a number please

    • @codeitup
      @codeitup  5 лет назад +1

      a=int(input("Enter Number"))
      count=0
      while(a>0):
      count=count+1
      a=a//10
      print(count)

    • @aksharvikram5787
      @aksharvikram5787 5 лет назад

      Thanks

    • @aksharvikram5787
      @aksharvikram5787 5 лет назад

      @@codeitup it is looking wrong

    • @codeitup
      @codeitup  5 лет назад

      @@aksharvikram5787
      No, its perfectly alright. Run and see the result.

    • @aksharvikram5787
      @aksharvikram5787 5 лет назад +2

      Write a program to count the number of even and odd number between 1 to 100

  • @im_armanmathur
    @im_armanmathur 3 года назад +1

    Sir but this program us giving sum or numbers upto we .....eg..if I give 5....outcome is 6.....and not the (2+4+6+8+10)=30🙄

  • @adarshnarayan8096
    @adarshnarayan8096 2 года назад

    Sir I'm going to kiit and i Haven't r
    Took computer in my class 12 i have good idea about java is it good if i study your python 130 video playlist to clear basic python

    • @mayurlavangare9432
      @mayurlavangare9432 2 года назад +2

      continue with java if you're well versed in it.. If you don't like java or find it difficult to understand then only learn python. Don't waste your time in learning every language, Simply master one language first and then see what do you want to be... that is whether you want to be a full stack developer, Software developer, Data analyst, Machine learning or AI , etc...

    • @adarshnarayan8096
      @adarshnarayan8096 2 года назад

      @@mayurlavangare9432 software developer i love coding in java but the problem i am facing is loop otger wise everything is going well

  • @RahulDas-ml1ny
    @RahulDas-ml1ny 4 года назад

    n=int(input())
    i=2
    sum=0
    while i

    • @codeitup
      @codeitup  4 года назад

      Yes, it is Rahul !

  • @AakashKumar-gy7hy
    @AakashKumar-gy7hy 3 года назад +1

    Hello sir
    This program is not working.
    Please sir
    I am following your all lactures.
    Please🙏 sir reply soon.

  • @lavisharora
    @lavisharora 4 года назад +3

    Hello Anand
    I am not getting the correct output
    can you please help with this
    n = int(input("Enter the number"))
    i = 1
    sum = 0
    count = 0
    while(count < n):
    if(n %2 == 0):
    sum = sum + 1
    count = count + 1
    i = i + 1
    print("Sum is", sum)
    Output
    Enter the number4
    Sum is 4

    • @codeitup
      @codeitup  4 года назад

      What is this program for?

    • @lavisharora
      @lavisharora 4 года назад

      @@codeitup Python Program to find Sum of First N Even numbers

    • @codeitup
      @codeitup  4 года назад

      @@lavisharora
      =========sum of first N Even numbers======
      n=int(input ("How Many Even Numbers? ")
      )
      i=1
      sum=0
      while i

    • @lavisharora
      @lavisharora 4 года назад

      ​@@codeitup Sorry I didn't understand :- I am running the same program as mentioned in the video above, But I am not getting the correct output for Python Program to find Sum of First N Even Numbers
      This is the program which I am trying to run :-
      n = int(input("How many even numbers ? "))
      i = 1
      sum = 0
      count = 0
      while(count < n ):
      if(n %2 == 0):
      sum = sum + i
      count = count + 1
      i = i + 1
      print("Sum is", sum)
      Output :-
      How many even numbers ? 4
      Sum is 10
      I will be really thankful if you can help me with correct /debug code
      Thanks

    • @rajsahay3530
      @rajsahay3530 3 года назад

      I am also getting wrong output 🥺😔🥺

  • @prithuraj5659
    @prithuraj5659 3 года назад

    Apna Bacha liya bhaiya offline exam start hona vala madat milege😂😂😂😂

    • @codeitup
      @codeitup  3 года назад

      😃😃😃😃Thanks Prithu, keep learning!

  • @KaushikkrSarma
    @KaushikkrSarma 4 года назад +1

    Sir for sum of odd integers we can replace the i%2==0 by i%2!=0
    Aisa karne pe vi aaraha he sir ..

    • @codeitup
      @codeitup  4 года назад +1

      Yes, it will definitely work Kaushik.🙂

    • @KaushikkrSarma
      @KaushikkrSarma 4 года назад +1

      Thanks a lot for your quick response sir. Your response is a get motivation for us .

    • @codeitup
      @codeitup  4 года назад +1

      @@KaushikkrSarma Keep Learning Keep Supporting.. :)

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

    n=int(input("Enter the number you want to sum:"))
    i=0
    sum=0
    while(i

  • @RishiThalakoti
    @RishiThalakoti 3 года назад +1

    #Program to find the sum of first n even numbers
    n=int(input("Enter the number="));
    i=1;
    sum=0;
    while(i

    • @laladeshmukh3552
      @laladeshmukh3552 2 года назад

      Nhi bhai
      Agar user number ki jagah 100 dalta hai,
      To apke program ke according
      Python 100 tak jitne bhi even number aate hai uska sum nikalega
      Naki 100 even numbers ka

    • @RishiThalakoti
      @RishiThalakoti 2 года назад

      @@laladeshmukh3552 no bro
      Run the code once

    • @laladeshmukh3552
      @laladeshmukh3552 2 года назад

      @@RishiThalakoti 👍🏻👍🏻👍🏻

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

    again done

  • @AyushYadav-jc8mg
    @AyushYadav-jc8mg Год назад

    i couldnt get y we are we are using count ........i solved it without usinf count function i=2 to n=2n tak using while loop kindly explain count method i want to understand this method too

  • @piyush-wm8js
    @piyush-wm8js 3 года назад +1

    Sir can you plz provide the pdf of the notes

  • @immutable4332
    @immutable4332 4 года назад +1

    sir i am not getting the answer plz help me i am doing same as you but not getting the same answer
    number = int(input("number"))
    n=1
    sum = 0
    count = 0
    while count

    • @codeitup
      @codeitup  4 года назад +1

      The program is perfetly alright !

    • @immutable4332
      @immutable4332 4 года назад

      @@codeitup sir but the answer iam getting is wrong

    • @ankittakshak7
      @ankittakshak7 3 года назад

      In the line of loop
      While(count

    • @AdityaGupta-ov5in
      @AdityaGupta-ov5in 3 года назад

      @immutable try this
      n=int(input("enter number"))
      i=2
      sum=0
      count=0
      while (count

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

    thk u

  • @jyotibharti9619
    @jyotibharti9619 4 года назад

    Sir mera run nahi ho raha programming

  • @shivaniyadav3773
    @shivaniyadav3773 4 года назад

    Sir I have a query is this enough for class 12 boards

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

    difference between ghis and previous program

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

      i think here we are coounting and then adding in previous one we were just adding from 1 to n

  • @samreenkhan6578
    @samreenkhan6578 4 года назад +2

    Mera iska output nhi aya sir

    • @codeitup
      @codeitup  4 года назад

      Paste your code here, I will make the corrections.

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

    Sir output nhi a rha

  • @whitedevil9860
    @whitedevil9860 4 года назад

    sir app online class lete hai ??

    • @codeitup
      @codeitup  4 года назад

      Yes, going to start from 15 December. For details pls mail to : letscodeup@gmail.com

  • @suryanshmishra4401
    @suryanshmishra4401 2 года назад

    Sir Programs ki playlist alag se bana dijiye

  • @the_indian-
    @the_indian- 4 года назад +1

    Sir to in questions ki playlists banao plz dhoondne nahi a raha hai konsa question kaha hai.

    • @codeitup
      @codeitup  4 года назад +1

      Dear The Indian, open Python Playlist, every videos are there. I have made tutorial steo by step.
      First u will find normal programs, then if programs, then while, then for, then list, tuple, dictionary. So you will find in the same order.

    • @the_indian-
      @the_indian- 4 года назад +1

      @@codeitup OK sir but I am saying make playlists for just that particular questions.

  • @priyanshipranami2004
    @priyanshipranami2004 3 года назад

    Sir hum 'count' kio Lete hai?

  • @Amitvlogs4u
    @Amitvlogs4u 2 года назад

    Sir blurr video a rhi he

    • @codeitup
      @codeitup  2 года назад

      Increase video play quality..

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

    done

  • @surjeetraghuwanshi4616
    @surjeetraghuwanshi4616 4 года назад

    Vidio must be display in sequence

    • @codeitup
      @codeitup  4 года назад

      All the videos are in sequence, please follow the playlist.

  • @VickyKumar-qp2di
    @VickyKumar-qp2di 2 года назад

    your code are not running sir plz do practical

  • @mohammedilyasilyas1118
    @mohammedilyasilyas1118 2 года назад

    😁😁😁

  • @ArunKumar-mf9zj
    @ArunKumar-mf9zj 4 года назад

    Sir jo sum or count he wo to loop me he hi nahi

    • @codeitup
      @codeitup  4 года назад

      Agar hum loop me sum ya count ko initilaize karenge to wo baar baar jab bhi loop run hoga zero se initialize ho jaega.

  • @VanshdeepSingh-zg8dh
    @VanshdeepSingh-zg8dh 6 месяцев назад

    Not working

  • @gauravchothe7386
    @gauravchothe7386 3 года назад

    Sir == q lagte Ho

  • @rajsahay3530
    @rajsahay3530 3 года назад

    Kiska-Kiska output galat aaya hain 😎😎