{"id":17123,"date":"2021-08-17T08:48:30","date_gmt":"2021-08-17T03:18:30","guid":{"rendered":"https:\/\/python-programs.com\/?p=17123"},"modified":"2021-11-22T18:37:22","modified_gmt":"2021-11-22T13:07:22","slug":"python-program-to-print-non-square-numbers","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-non-square-numbers\/","title":{"rendered":"Python Program to Print Non Square Numbers"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Remove any Non-ASCII Characters<\/a>
\nNon-square numbers :<\/strong><\/p>\n

Non-square numbers are those that are not perfect squares of any number. When you multiply any number by itself, you get a square number. A non-square number is the inverse of the same. For example, 16 is a square number because it can be written as 4 x 4, whereas 7 is not. Other non-square numbers include 2, 3, 5, 6, 7, 8, and 10.<\/p>\n

math module :<\/strong><\/p>\n

The math module is a standard Python module that provides access to various mathematical functions for performing mathematical operations.<\/p>\n

The math module in Python provides access to the following mathematical functions: exp(x), pow(x,y), log10(x), sqrt(x), and so on.<\/p>\n

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

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

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

Given range = 8<\/pre>\n

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

The non square numbers in a given range = \r\n2\r\n3\r\n5\r\n6\r\n7<\/pre>\n

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

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

Given range = 15<\/pre>\n

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

The non square numbers in a given range = \r\n2\r\n3\r\n5\r\n6\r\n7\r\n8\r\n10\r\n11\r\n12\r\n13\r\n14<\/pre>\n

Program to Print Non-Square Numbers<\/h2>\n

Below are the ways to print the non-square numbers.<\/p>\n