i=int(input("enter the number")); sum=0; pro=1; while(i>0): d=1%10; if (d%2==0): sum=sum+d; else: pro=pro*d; i=i//10; print("sum=",sum,"product=",pro);

0

i=int(input("enter the number")); sum=0; pro=1; while(i>0): d=1%10; if (d%2==0): sum=sum+d; else: pro=pro*d; i=i//10; print("sum=",sum,"product=",pro);

By Beginner Devin McGlynn at May 27 2021


Related code examples


Code examples by languages