# Finding even number for the range given by user

This blog contain a program which add all even numbers from a range entered by user

Asking user to enter start and end number.

```start = int(input('Enter Start Number: '))
end = int(input('Enter End Number: '))```

Creating a variable and initialized with 0 value

```counter = 0
```

Creating an empty list

`even_list =[]`

Using for loop with start and end range defined by user input. Finding even number and appending even numbers into a list. All even numbers are added and saved into counter variable

```for num in range(start,end):
if num%2 == 0:
even_list.append(num)
counter = counter + num```

At last, printing list items and addition of even number from counter variable

```print('Even number between range %d and %d: '%(start,end),even_list)

Output

```Enter Start Number: 2
Enter End Number: 15
Even number between range 2 and 15:  [2, 4, 6, 8, 10, 12, 14]

Complete Code

```start = int(input('Enter Start Number: '))
end = int(input('Enter End Number: '))
counter = 0
even_list =[]
for num in range(start,end):
if num%2 == 0:
even_list.append(num)
counter = counter + num
print('Even number between range %d and %d: '%(start,end),even_list)