00:01
We're going to be creating a python program that will calculate the sum of all odd numbers in a list.
00:06
So to get started, we want to create a list in an empty list.
00:11
I'll name it odd and the odd list.
00:22
Now we want to create a wild loop or we could create a for loop.
00:34
So we can ask the user how many times they would like.
00:38
The loop to run.
00:40
So to get input from the user, we need to first cast the input to an fixture.
00:47
So enter amount of times to add numbers.
00:57
So we would then create a for loop in range of our number, which is the variable right here, which is the user net.
01:08
Now we want to then ask the user, which we want to then ask the user, which we we can copy this and paste.
01:16
We'll change the variable name to user num.
01:21
And we can also change a message to enter numbers.
01:31
Okay, that looks good.
01:33
So now, so far, we've asked the user to enter a number within the four loop where this is defined how many times are going to loop.
01:46
So if they wanted to loop the program twice it would be two so we're going to then check if we have odd numbers if the user has odd numbers so check our variable username we're going to do the modulo of two and if it does not equal zero that means we have an odd number so so we want to, oops, take our odd list variable that we created and we want to append it.
02:30
We want to add this odd number...