{"id":18543,"date":"2021-08-26T10:38:29","date_gmt":"2021-08-26T05:08:29","guid":{"rendered":"https:\/\/python-programs.com\/?p=18543"},"modified":"2021-11-22T18:37:18","modified_gmt":"2021-11-22T13:07:18","slug":"python-program-to-find-even-digits-sum-and-odd-digits-sum-divisible-by-4-and-3-respectively","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-even-digits-sum-and-odd-digits-sum-divisible-by-4-and-3-respectively\/","title":{"rendered":"Python Program to Find Even Digits Sum and Odd Digits Sum Divisible by 4 and 3 Respectively"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find the 2nd Largest Digit in a Given Number<\/a>
\nGiven a number, and the task is to check if the sum of even digits of a number is divisible by 4 and the sum of odd digits of a given number is divisible by 3.<\/p>\n

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

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

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

Given Number = 123452<\/pre>\n

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

yes, the even digits sum and odd digits sum of a given number{ 123452 } is divisible by 4 and 3 respectively.<\/pre>\n

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

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

Given Number = 4532176<\/pre>\n

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

No, the even digits sum and odd digits sum of a given number{ 4532176 } is not divisible by 4 and 3 respectively.<\/pre>\n

Program to Find Even Digits Sum and Odd Digits Sum Divisible by 4 and 3 Respectively in Python:<\/h2>\n

Below are the ways to check if the sum of even digits of a number is divisible by 4 and the sum of odd digits of a given number is divisible by 3.<\/p>\n