{"id":14925,"date":"2021-10-01T10:00:19","date_gmt":"2021-10-01T04:30:19","guid":{"rendered":"https:\/\/python-programs.com\/?p=14925"},"modified":"2021-11-22T18:33:30","modified_gmt":"2021-11-22T13:03:30","slug":"python-program-to-check-whether-all-digits-of-a-number-divide-it","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-check-whether-all-digits-of-a-number-divide-it\/","title":{"rendered":"Python Program to Check whether all Digits of a Number Divide it"},"content":{"rendered":"

Using a Python program, we will learn how to check whether all of the digits in a number divide it. We’ll divide the given number by each digit to see if it’s divisible. So you’ll learn how to retrieve a number’s individual digits, a method to check whether the number is divisible by its digits, and a Python program to do so.<\/p>\n

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

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

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

Given Number =144<\/pre>\n

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

The given number [ 144 ] all the digits of the given number divides the given number<\/pre>\n

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

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

Given Number =369<\/pre>\n

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

The given number [ 369 ] all the digits of the given number do not divide the given number<\/pre>\n

Program to Check whether all Digits of a Number Divide it in Python<\/h2>\n

Below are the ways to check whether all the digits of the given number divide it using Python<\/p>\n