Discussions Events Study Material Jobs
Print All Even Numbers in a List using while loop in Python - Uniwaly

Explore Diverse Conversations

Print All Even Numbers in a List using while loop in Python

Posted By: UmairMehmood Published On: 13 June 2025 At: 11:43 AM

Input a list of 10 numbers and print only the even ones using a while loop.
numbers = []

i = 0
while i < 10:
    num = int(input(f"Enter number {i+1}: "))
    numbers.append(num)
    i += 1
print("\nEven numbers in the list:")
j = 0
while j < len(numbers):
    if numbers[j] % 2 == 0:
        print(numbers[j])
    j += 1


Tags:

python python list python while loop
Login to like

Posted By:

Author Profile

UmairMehmood

11 days ago

Join the conversation!

Login to Comment

Discover More Articles

Afternoon Teaching Staff Hiring Process

Kazakhstan Government Scholarship - How to Apply ? - Complete Detail

Divisional Manager - The Urban Unit Jobs 2025

New 30,000 Teaching Jobs Coming Soon on Merit : CM Punjab

پاکستانی ڈاکٹر کو کینیڈا کے بڑے سول اعزاز آرڈر آف کینیڈا سے نواز دیا گیا

Calculate and print each student average using Python

NIU - NUR International University - Admission Process

PPSC Jobs - Male and Female Assistant Registrar Cooperative Societies 2025

Describe in the light of Paget’s theory the cognitive and intellectual development of a child at different levels.

Global Scholarship Opportunities for 2025 – Fund Your Education Abroad