#Write a program that reads a sequence of positive integers between 100 #and 999. The first integer outside of the range 100 - 999 terminates the #input. The program finds the average of the last digits of the even #numbers and the first digits of the odd numbers. You can assume that the #input is valid and not empty - there is at least one positive integer in #the input. def main(): count=0 sum=0 num=int(input("enter int between 100 and 999 ")) while(num>=100 and num<=999): if(num%2==0): sum=sum+num%10 else: sum=sum+num//100 count+=1 num=int(input("enter int between 100 and 999 ")) if(count>0): print(sum/count) else: print('no valid inputs') main()