Computer Science, asked by minibindra2016, 6 months ago

Write a program to input a 3 digit number (using function parameter) and print whether the sum of the first and last digit is an even number or not.​

Answers

Answered by sambhavgautam6
1

Explanation:

#program to input a 3 digit number

num=int(input("enter 3digit value::")

flag=0

n=num

sum=0

while n>0:

flag=num%10

num=num//100

sum=sum+flag

if sum%2=0:

print ("the number is even")

else:

print("the number is odd")

Sry i dont know about function parameter.

but this may help you..

Similar questions