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
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
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. :)
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
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
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...
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 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
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
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
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
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.
I am following all your videos step by step and enjoying learning python. Thanks for such awesome videos sir.
Thanks babli.
n=int(input("Enter the no. you want to sum: "))
i=1
_sum=0
while i
wrong..this program is used to print sum of even numbers from 1 to n
Sir aap really bahut hi achha samjhte hain.i am 101% satisfied in this video lac
Thanks a lot!
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 sir can you please lil bit explain me this concept I didn't get specially 2*n
Sir you are a brilliant teacher... 👌👌👌👌👌👌👌
🙂
very knowledgable video.
Glad you liked it!
Aapka samjhane ka tarika bahut hi achha hain
Thanks!
Thank you so much sir .....It is very helpful 👍👍👍
Most welcome🙂
Thank you sir it is very helpful
Glad to help you Chirag!
Nice explanation
Thankyou sirrrrr veryyy much❤️.you taught very nicely
Glad to help you Radhika!
This vedio is helpfull❤❤
Very naice explanation like it very muck
Thanks for liking!
Thanks sir... It's really helping me
Glad to help you dear😊
# program to find sum of first n eve numbers
n=int(input("enter the value of n : "))
i=2
total=0
while(i
Good attempt.
@@codeitup thank u sir
n=int(input("Enter a number:"));
sum=0;
i=2;
while (i
Nice video❤❤❤
Thanks !
Sir I am enjoying video very much!
Thank you sir !
Sir my nickname is also "ANAND"
😃😃🥰🥰
Sunkar "ANAND" aa gaya !
Tq so much sir 🙏❤️🔥
Most welcome😊
Thank you sir
Thanks Rekha, if you really liked the content, share this channel with your friends..
Awesome sirji
Thanks Adnan!
V.Good ❤️
Thanks🙂
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
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
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
Perfectly correct Hardeep ! Good !
Sir in this count is there but in 1to n pgm no count why? Pls reply sir
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. :)
i=0;
sum=0;
while i
A single program may be written in n number of ways dear!
n tends to infinity
Sir is program main count ko 1 bhi de sakte hain aur (count
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
i=1
count=0
a=0
n=int(input("enter first n even number "))
while count
@@vaibhavkumar9047 actually I want to say that my code will also works as yours.😁
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?
set i=3 and i=i+2
sir how to perform this code by using for loop
n=int(input('Enter value please '))
i=2
sum=0
count=0
while (count
Thanks sir
😊
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
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
Write a program to display the addition of first 20 even number..
count=0
i=1
sum=0
while(count
@@codeitup sir 3 error Aa rhe he..plz help
@@rohitbaikar1341 Join my facebook group in the description link and share the snapshot.
Sir can we write this program as this
i=2
sum=0
count=0
while(count
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
Sir what would be the result if we didn't correct count
Run it and see !
sir hmne starting mein (count
n=int(input("Enter your number:"))
i=2
sum=0
while(i
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
Write a program to count the number of digits in a number please
a=int(input("Enter Number"))
count=0
while(a>0):
count=count+1
a=a//10
print(count)
Thanks
@@codeitup it is looking wrong
@@aksharvikram5787
No, its perfectly alright. Run and see the result.
Write a program to count the number of even and odd number between 1 to 100
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🙄
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
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...
@@mayurlavangare9432 software developer i love coding in java but the problem i am facing is loop otger wise everything is going well
n=int(input())
i=2
sum=0
while i
Yes, it is Rahul !
Hello sir
This program is not working.
Please sir
I am following your all lactures.
Please🙏 sir reply soon.
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
What is this program for?
@@codeitup Python Program to find Sum of First N Even numbers
@@lavisharora
=========sum of first N Even numbers======
n=int(input ("How Many Even Numbers? ")
)
i=1
sum=0
while i
@@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
I am also getting wrong output 🥺😔🥺
Apna Bacha liya bhaiya offline exam start hona vala madat milege😂😂😂😂
😃😃😃😃Thanks Prithu, keep learning!
Sir for sum of odd integers we can replace the i%2==0 by i%2!=0
Aisa karne pe vi aaraha he sir ..
Yes, it will definitely work Kaushik.🙂
Thanks a lot for your quick response sir. Your response is a get motivation for us .
@@KaushikkrSarma Keep Learning Keep Supporting.. :)
n=int(input("Enter the number you want to sum:"))
i=0
sum=0
while(i
#Program to find the sum of first n even numbers
n=int(input("Enter the number="));
i=1;
sum=0;
while(i
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
@@laladeshmukh3552 no bro
Run the code once
@@RishiThalakoti 👍🏻👍🏻👍🏻
again done
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
Sir can you plz provide the pdf of the notes
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
The program is perfetly alright !
@@codeitup sir but the answer iam getting is wrong
In the line of loop
While(count
@immutable try this
n=int(input("enter number"))
i=2
sum=0
count=0
while (count
thk u
Welcome!
Sir mera run nahi ho raha programming
Sir I have a query is this enough for class 12 boards
Yes shivani !
difference between ghis and previous program
i think here we are coounting and then adding in previous one we were just adding from 1 to n
Mera iska output nhi aya sir
Paste your code here, I will make the corrections.
Sir output nhi a rha
sir app online class lete hai ??
Yes, going to start from 15 December. For details pls mail to : letscodeup@gmail.com
Sir Programs ki playlist alag se bana dijiye
Sir to in questions ki playlists banao plz dhoondne nahi a raha hai konsa question kaha hai.
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.
@@codeitup OK sir but I am saying make playlists for just that particular questions.
Sir hum 'count' kio Lete hai?
Sir blurr video a rhi he
Increase video play quality..
done
👍
Vidio must be display in sequence
All the videos are in sequence, please follow the playlist.
your code are not running sir plz do practical
😁😁😁
Sir jo sum or count he wo to loop me he hi nahi
Agar hum loop me sum ya count ko initilaize karenge to wo baar baar jab bhi loop run hoga zero se initialize ho jaega.
Not working
Sir == q lagte Ho
Kiska-Kiska output galat aaya hain 😎😎