Dremendo Tag Line

Input 10 numbers in integer list and print only two digit even numbers from it in Python

Lists - Question 1

In this question, we will see how to input 10 numbers in integer list and print only the two digit even numbers from it in Python programming. To know more about lists click on the lists lesson.

Q1) Write a program in Python to input 10 numbers in integer list and print only the two digit even numbers from it.

Program

a=list()

print('Enter 10 numbers')
for i in range(10):
    a.append(int(input()))

print('2 digit even numbers are')
for i in range(10):
    if a[i]>=10 and a[i]<=99 and a[i]%2==0:
        print(a[i],end=' ')

Output

Enter 10 numbers
81
23
42
6
94
30
15
63
19
2
List of 2 digit even numbers
42 94 30
video-poster