input a number and check whether the thousands place is odd or even ??
n = int(input()) th = n%10000 th_num = th // 1000 if (th_num%2 == 0): print('the thousands place in given number{} is even'.format(n)) else: print("the thousands place in given number {} is odd".format(n))
n = int(input()) th = n%10000 th_num = th // 1000 th_num = n // 1000 if (th_num%2 == 0): print('the thousands place in given number{} is even'.format(n)) else: print("the thousands place in given number {} is odd".format(n))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)