# even and odd numbers python

questioned by maham237 @ in Computers & Technology viewed by 37 People

Python

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. If the input is: 5 2 4 6 8 10 Then the output is: all even If the input is: 5 1 3 5 7 9 Then the output is all odd If the input is: 5 1 2 3 4 5 Then the output is: not even or odd Your program must define and call the following three functions. def GetUserValues(). GetUserValues reads in, creates, and returns the list of integers. def IsListEven(myList). IsListEven returns true if all integers in the list are even and false otherwise. def IsListOdd(myList). IsListOdd returns true if all integers in the list are odd and false otherwise.