{"id":18538,"date":"2021-08-26T10:38:41","date_gmt":"2021-08-26T05:08:41","guid":{"rendered":"https:\/\/python-programs.com\/?p=18538"},"modified":"2021-11-22T18:37:17","modified_gmt":"2021-11-22T13:07:17","slug":"python-program-to-calculate-the-product-of-digits-of-a-number-at-even-and-odd-places","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-calculate-the-product-of-digits-of-a-number-at-even-and-odd-places\/","title":{"rendered":"Python Program to Calculate the Product of Digits of a Number at Even and Odd places"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Check Whether Product of Digits at Even places of a Number is Divisible by K<\/a>
\nGiven a number, the task is to calculate whether or not the product of its digits at even and odd places.<\/p>\n

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

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

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

Given Number = 432172<\/pre>\n

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

The product of all digits at even places in a given number{ 432172 } = 56\r\nThe product of all digits at odd places in a given number { 432172 } = 6<\/pre>\n

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

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

Given Number = 2134315<\/pre>\n

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

The product of all digits at even places in a given number{ 2134315 } = 90\r\nThe product of all digits at odd places in a given number { 2134315 } = 4<\/pre>\n

Program to Check if Product of Digits of a Number at Even and Odd places is Equal in Python<\/h2>\n

Below are the ways to determine whether or not the product of its digits at even and odd places is equal.<\/p>\n