For this task, you are to write a Python code that asks the user to enter 2 or more integers as a string, to be entered on one line, separated by one zero. If there are more than one zero, then these will be a part of the number. The program then finds the even numbers, computes and prints out the average. See the below example:
num = input("Enter your number. ")
Assume the user entered "2040304405", then the summation of even numbers is 2+4+44=50, and the average is 50/3=16.6
INPUT
2040304405
200400604405
EXPECTED OUTPUT
2+4+44=50
50/3= 16.6
20+40+ 6+44=110
110/4=27.5
Comments
Leave a comment