Even Odd Checker in list Program in Python


Even Odd Checker in list Program in 
Python


Code:

mylist=[0 for i in range(3)]
for i in range(3):
    mylist[i]=int(input("please enter elecments"))
for i in range(3):
    if(mylist[i]%2==0):
        print("even number",mylist[i])
    else:
        print("odd number",mylist[i])








Output:


please enter elecments1
please enter elecments2
please enter elecments3
odd number 1
even number 2
odd number 3
>>> 

Video Tutorial:




Post a Comment

Previous Post Next Post