Answer:
The program in Python is as follows:
n = int(input("Number of inputs: "))
total = 0; product = 1
for i in range(n):
num = int(input(": "))
if num%2 == 0:
total+=num
else:
product*=num
print("Sum of even: ",total)
print("Product of odd: ",product)
Explanation:
This prompts the user for the number of inputs, n
n = int(input("Number of inputs: "))
This initializes sum (total) to 0 and products to 1
total = 0; product = 1
This iterates through n
for i in range(n):
This gets the inputs
num = int(input(": "))
If input is even, calculate the sum
<em> if num%2 == 0:</em>
<em> total+=num</em>
If otherwise, calculate the product
<em> else:</em>
<em> product*=num</em>
Print the required outputs
<em>print("Sum of even: ",total)</em>
<em>print("Product of odd: ",product)</em>
<em />