Respuesta :
n = int(input("How many numbers do you need to check? "))
odd = 0
even = 0
i = 0
while i < n:
num = int(input("Enter number: "))
if num % 2 == 0:
even += 1
print(str(num)+" is an even number")
else:
odd += 1
print(str(num)+" is an odd number")
i += 1
print("You entered "+str(even)+" even number(s).")
print("You entered "+str(odd)+" odd number(s).")
I hope this helps!
The program allows user to enter a specified number of values and displays if the number is even or odd ; The program written in python 3 goes thus :
num_inputs = int(input('number of inputs : '))
#prompts user to enter a specified Number of inputs
count = 1
#keeps of the number of inputs supplied
while count <= num_inputs :
#iterate using a while loop
your_num = int(input('Enter a number : '))
#prompts user to enter an integer value
count+=1
#increase counter by 1
if your_num%2 == 0 :
#checks if number is even
print('even number')
else:
print('odd number')
A sample run of the progam is attached below.
Learn more :https://brainly.com/question/20720413
