{"id":16257,"date":"2021-08-12T09:36:41","date_gmt":"2021-08-12T04:06:41","guid":{"rendered":"https:\/\/python-programs.com\/?p=16257"},"modified":"2021-11-22T18:38:27","modified_gmt":"2021-11-22T13:08:27","slug":"python-program-to-print-all-disarium-numbers-within-given-range","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-all-disarium-numbers-within-given-range\/","title":{"rendered":"Python Program to Print all Disarium Numbers within Given range"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Get Tangent value Using math.tan()<\/a>
\nDisarium Number:<\/strong><\/p>\n

A Disarium number is one in which the sum of each digit raised to the power of its respective position equals the original number.<\/p>\n

like 135 , 89, etc.<\/p>\n

Here 1^1 + 3^2 + 5^3 = 135 so it is disarium Number<\/p>\n

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

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

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

Given lower limit range = 7\r\nGiven upper limit range = 180<\/pre>\n

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

The disarium numbers in the given range 7 and 180 are: \r\n7 8 9 89 135 175<\/pre>\n

Example 2:<\/strong><\/p>\n

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

Given lower limit range = 1\r\nGiven upper limit range = 250<\/pre>\n

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

The disarium numbers in the given range 1 and 250 are:\r\n1 2 3 4 5 6 7 8 9 89 135 175<\/pre>\n

Program to Print all Disarium Numbers within Given range<\/h2>\n

Below are the ways to Print all Disarium Numbers within the given range.<\/p>\n