{"id":15308,"date":"2021-10-01T10:30:38","date_gmt":"2021-10-01T05:00:38","guid":{"rendered":"https:\/\/python-programs.com\/?p=15308"},"modified":"2021-11-22T18:33:28","modified_gmt":"2021-11-22T13:03:28","slug":"python-program-to-print-neon-numbers-in-a-range","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-neon-numbers-in-a-range\/","title":{"rendered":"Python Program to Print Neon numbers in a Range"},"content":{"rendered":"

In this article, we will learn how to print Neon numbers within a specific range in Python. You will learn what a Neon number is, how to check whether a given number is a Neon number, and how to write a Python code that outputs all the Neon numbers within the user-specified range.<\/p>\n

Neon Number:<\/strong><\/p>\n

A Neon Number is a number whose square sum of digits equals the original number.<\/p>\n

Ex: 9<\/p>\n

Square of 9 =81<\/p>\n

Sum of digits of square = 8 +1 =9 ,So it is Neon Number<\/p>\n

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

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

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

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

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

The Neon numbers in the given range 1 and 7 are:\r\n1<\/pre>\n

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

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

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

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

Enter lower limit range and upper limit range separate bt spaces = 1 23\r\nThe Neon numbers in the given range 1 and 23 are:\r\n1 9<\/pre>\n

Program to Print Neon numbers in a Range in Python<\/h2>\n

Below are the ways to print all the Neon numbers in the given range.<\/p>\n