{"id":18519,"date":"2021-08-26T10:38:55","date_gmt":"2021-08-26T05:08:55","guid":{"rendered":"https:\/\/python-programs.com\/?p=18519"},"modified":"2021-11-22T18:37:17","modified_gmt":"2021-11-22T13:07:17","slug":"python-program-to-check-whether-sum-of-digits-at-odd-places-of-a-number-is-divisible-by-k","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-check-whether-sum-of-digits-at-odd-places-of-a-number-is-divisible-by-k\/","title":{"rendered":"Python Program to Check Whether Sum of digits at Odd places of a Number is Divisible by K"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find Even Digits Sum and Odd Digits Sum Divisible by 4 and 3 Respectively<\/a>
\nThe task is to check if the sum of digits at odd places of a given number is divisible by the another given input number say K.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given  Number = 24689131\r\nGiven  another Number (k) = 2<\/pre>\n

Output:<\/strong><\/p>\n

The sum of digits at odd places of the given number{ 24689131 } is divisible by the another given number k{ 2 }<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 12573\r\nGiven another Number (k) = 5<\/pre>\n

Output:<\/strong><\/p>\n

The sum of digits at odd places of the given number{ 12573 } is not divisible by the another given number k{ 5 }<\/pre>\n

Program to Check Whether Sum of digits at Odd places of a Number is Divisible by K in Python<\/h2>\n

Below are the ways to check if the sum of digits at odd places of a given number is divisible by the another given input number say K.<\/p>\n