#write a program that reads 5-digit positive integer and finds sum and #average of its digits #This is a counter-controlled repetition because you know that your input #number has 5 digits so the loop will execute 5 times num=int(input("enter 5-digit positive number ")) if(num>=10000 and num<=99999): sum=0 count=5 while(count>0): d=num%10 num=num//10 sum=sum+d count=count-1 print("sum digits", sum) print("average", sum/5) else: print("invalid input")