Related code examples
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);
write a python program that calculates the sum of two given integers within the range [0...9] and prints the answer to the terminal.
Python Write a program that asks the user to enter 3 numbers. Create variables called total and average that hold the sum and average