Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow.


Ex: If the input is:


5

2

4

6

8

10

the output is:


all even

Answer :

Answer:

lis=[]

lis=input("Enter a list of integers:")

i=0

for i in range(0, len(lis)):

   j=int(lis[i])

   if j%2==0:

       print(j, "is even")

   else:

       print(j, "is odd")

Explanation:

Please check the answer section.

Answer:

integers = []

while True:

      number = int(input("Enter integers (Enter negative number to end) "))

      if number < 0:

         break

      integers.append(number)  

print ("The smallest integer in the list is : ", min(integers))

print("The largest integer in the list is : ", max(integers))

Explanation: