{"id":25535012,"date":"2022-10-18T20:00:58","date_gmt":"2022-10-18T14:30:58","guid":{"rendered":"https:\/\/entri.app\/blog\/?p=25535012"},"modified":"2023-11-23T20:42:26","modified_gmt":"2023-11-23T15:12:26","slug":"python-program-to-check-whether-a-number-is-prime-or-not","status":"publish","type":"post","link":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/","title":{"rendered":"Prime Number Program in Python"},"content":{"rendered":"<p>Python is a high-level, object-oriented programming language with built-in dynamic semantics that is largely used for creating apps and websites. The distinctive features that Python offers play a significant role in its enormous popularity. Python is relatively simple to use and learn. It has a straightforward setup, clear syntax, and numerous useful applications that are crucial in web development. In comparison to other languages, the syntax is rather straightforward, and a tonne of modules may be imported to drastically reduce the length of the code. Starting with a language that is challenging to master for a beginner in the field of programming slows down learning and adds complexity.<\/p>\n<p style=\"text-align: center;\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\">&#8220;Ready to take your python skills to the next level? Sign up for a free demo today!&#8221;<\/a><\/strong><\/p>\n<p>With the<a href=\"https:\/\/entri.app\/course\/python-programming-course\/\"> Python programming language<\/a>, a beginner can be quickly exposed to core ideas like procedures and loops and probably begin working with user-defined objects. It does not require to be compiled when using the Python programming language. Simply running the Python code is all that is required; linking to libraries is not necessary. Here, interpreted refers to the fact that the source code is run line by line rather than all at once, which makes it simpler to debug the code. In Python, the source code is transformed into &#8220;bytecodes,&#8221; which are then translated into the computer&#8217;s native language. Python&#8217;s class system creates classes with the fewest possible new semantics and syntax.<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center;\" colspan=\"3\">\n<h5><span style=\"color: #ffffff;\"><strong>Are you aspiring for a booming career in IT? If YES, then dive in<\/strong><\/span><\/h5>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<h5><a href=\"https:\/\/entri.app\/course\/full-stack-developer-course\/\"><strong>Full Stack Developer Course<\/strong><\/a><\/h5>\n<\/td>\n<td>\n<h5><a href=\"https:\/\/entri.app\/course\/python-programming-course\/\"><strong>Python Programming Course<\/strong><\/a><\/h5>\n<\/td>\n<td>\n<h5><a href=\"https:\/\/entri.app\/course\/data-science-and-machine-learning-course\/\"><strong>Data Science and Machine Learning Course<\/strong><\/a><\/h5>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Prime Number Logic<\/h2>\n<p>A natural number n is said to be prime in number theory if it only contains two factors: one and the number itself (n). Remember this from your math classes: if a number I divides a number n evenly, it is said to be a factor of n. Every number has a factor of 1 in it. Each value of n has a self-referential component. Thus, for any value of n, 1 and n are trivial factors. Additionally, a prime number should only have these two elements.<\/p>\n<p>Python&#8217;s range() object allows you to cycle through every digit from 2 to n &#8211; 1. range(start, stop, step) in Python returns a range object. The sequence will then be from start-up to stop -1 in increments of step by iterating over the range object. Range(2, n) can be used in conjunction with the for a loop since we require the set of numbers from 2 to n-1. You can tell right away if a number is not prime if it divides n in an even number with no residual. A number is prime if no number that divides n evenly can be found after looping through the whole set of numbers from 2 up to n \u2013 1.<\/p>\n<p style=\"text-align: center;\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\">&#8220;Experience the power of our web development course with a free demo &#8211; enroll now!&#8221;<\/a><\/strong><\/p>\n<h3>Program to check if a number is prime or not in Python<\/h3>\n<p>A prime number is always positive, therefore we start the program by confirming that. To determine if there are any positive divisors except 1 and the input number itself, we divide the input number by all the numbers from 2 to (number &#8211; 1) in this range. If a divisor is discovered, we indicate that the number is not a prime number; otherwise, we indicate that it is. The function is prime() can now be defined as follows.<\/p>\n<p>def_prime(n)<\/p>\n<p>For i in range (2,n)<\/p>\n<p>If (n%i) == 0<\/p>\n<p>Return False<\/p>\n<p>Return True<\/p>\n<p>The argument for the aforementioned function is prime() is a positive integer n. The function returns False if a factor is discovered in the supplied range of (2, n-1), indicating that the number is not prime. And if you go through the entire loop without discovering a factor, it returns True.<\/p>\n<p>Let&#8217;s use arguments to call the function, then check to see if the result is accurate.<\/p>\n<p>Is_prime(2)<\/p>\n<p># True<\/p>\n<p>is_prime(11)<\/p>\n<p># False<\/p>\n<p>2 is prime, as you can see (the function returns True). And 11 is not a prime (the function returns False).<\/p>\n<p>Let us look at a Python program to check if a number is prime or not:<\/p>\n<p>num = int(input(&#8220;Enter a number: &#8220;))<\/p>\n<p># define a flag variable<br \/>\nflag = True<\/p>\n<p># prime numbers are greater than 1<br \/>\nif num &gt; 1:<br \/>\n# check for factors<br \/>\nfor i in range(2, num):<br \/>\nif (num % i) == 0:<br \/>\n# if factor is found, set flag to True<br \/>\nflag = false<br \/>\n# break out of loop<br \/>\nbreak<\/p>\n<p>check if flag is False<br \/>\nif flag:<br \/>\nprint(num, &#8220;is a prime number&#8221;)<br \/>\nelse:<br \/>\nprint(num, &#8220;is not a prime number&#8221;)<\/p>\n<p style=\"text-align: center;\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\">&#8220;Get hands-on with our python course &#8211; sign up for a free demo!&#8221;<\/a><\/strong><\/p>\n<h4>Conclusion<\/h4>\n<p>The naive method of determining whether a number is prime is to loop through all of the numbers in the range (2, n-1). N is prime if no factor can be found to divide it. You can decide to only run up to n\/2 because the only factor of n bigger than n\/2 is n. This article tried to cover the topic of how to check prime numbers in Python language.<\/p>\n<p><a href=\"https:\/\/entri.app\/course\/python-programming-course\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-25522670 size-full\" src=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1.png\" alt=\"Python and Machine Learning Rectangle\" width=\"970\" height=\"250\" srcset=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1.png 970w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1-300x77.png 300w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1-768x198.png 768w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Rectangle-1-750x193.png 750w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/a><\/p>\n<h4><strong>Related Articles<\/strong><\/h4>\n<div class=\"table-responsive wprt_style_display\">\n<table class=\"table\" dir=\"ltr\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"329\" \/>\n<col width=\"309\" \/><\/colgroup>\n<tbody>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Syllabus&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-village-field-assistant-vfa-syllabus-exam-pattern\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/program-for-finding-factorial-of-a-number-in-python\/\" target=\"_blank\" rel=\"noopener\">Program for Finding Factorial of a Number in Python<\/a><\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Mock Test&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-free-mock-test\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/why-python-is-used-for-data-science\/\" target=\"_blank\" rel=\"noopener\">Why Python Is Used For Data Science?<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Exam Date&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-exam-date\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/step-by-step-guide-for-getting-a-job-as-a-python-developer\/\" target=\"_blank\" rel=\"noopener\">Guide for getting a job as a Python Developer<\/a><\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Video Course&quot;}\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/top-python-interview-questions-and-answers\/\" target=\"_blank\" rel=\"noopener\">Python Advanced Interview Questions and Answers<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Application Form&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-apply-online\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/python-online-course\/\" target=\"_blank\" rel=\"noopener\">Best Online Python Course with Certificate<\/a><\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Kerala PSC VFA Study Materials&quot;}\" data-sheets-hyperlink=\"https:\/\/entri.app\/blog\/kerala-psc-vfa-study-material\/\"><strong><a class=\"in-cell-link\" href=\"https:\/\/entri.app\/blog\/type-conversion-in-python\/\" target=\"_blank\" rel=\"noopener\">What is Type Conversion in Python?<\/a><\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center;\" colspan=\"3\"><strong>Our Other Courses<\/strong><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/entri.app\/course\/mep-course\/\"><strong>MEP Course<\/strong><\/a><\/td>\n<td><a href=\"https:\/\/entri.app\/course\/quantity-surveying-course\/\"><strong>Quantity Surveying Course<\/strong><\/a><\/td>\n<td><a href=\"https:\/\/entri.app\/course\/montessori-teachers-training-course\/\"><strong>Montessori Teachers Training Course<\/strong><\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/entri.app\/course\/performance-marketing-course\/\"><strong>Performance Marketing Course\u00a0<\/strong><\/a><\/td>\n<td><a href=\"https:\/\/entri.app\/course\/practical-accounting-course\/\"><strong>Practical Accounting Course<\/strong><\/a><\/td>\n<td><a href=\"https:\/\/entri.app\/course\/yoga-teachers-training-course\/\"><strong>Yoga Teachers Training Course<\/strong><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Python is a high-level, object-oriented programming language with built-in dynamic semantics that is largely used for creating apps and websites. The distinctive features that Python offers play a significant role in its enormous popularity. Python is relatively simple to use and learn. It has a straightforward setup, clear syntax, and numerous useful applications that are [&hellip;]<\/p>\n","protected":false},"author":91,"featured_media":25535013,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[802,1903,1841,1888],"tags":[],"class_list":["post-25535012","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-coding","category-entri-skilling","category-python-programming"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Prime Number Program in Python - Entri Blog<\/title>\n<meta name=\"description\" content=\"Prime Number Program in Python - check whether a number entered by user is prime or not in Python\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prime Number Program in Python - Entri Blog\" \/>\n<meta property=\"og:description\" content=\"Prime Number Program in Python - check whether a number entered by user is prime or not in Python\" \/>\n<meta property=\"og:url\" content=\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/\" \/>\n<meta property=\"og:site_name\" content=\"Entri Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/entri.me\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-18T14:30:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-23T15:12:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png\" \/>\n\t<meta property=\"og:image:width\" content=\"820\" \/>\n\t<meta property=\"og:image:height\" content=\"615\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Kiranlal VT\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@entri_app\" \/>\n<meta name=\"twitter:site\" content=\"@entri_app\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kiranlal VT\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/\"},\"author\":{\"name\":\"Kiranlal VT\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/5c2c274e024447e3b9e8b4ee88389e4f\"},\"headline\":\"Prime Number Program in Python\",\"datePublished\":\"2022-10-18T14:30:58+00:00\",\"dateModified\":\"2023-11-23T15:12:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/\"},\"wordCount\":918,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png\",\"articleSection\":[\"Articles\",\"Coding\",\"Entri Skilling\",\"Python Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/\",\"url\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/\",\"name\":\"Prime Number Program in Python - Entri Blog\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png\",\"datePublished\":\"2022-10-18T14:30:58+00:00\",\"dateModified\":\"2023-11-23T15:12:26+00:00\",\"description\":\"Prime Number Program in Python - check whether a number entered by user is prime or not in Python\",\"breadcrumb\":{\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png\",\"width\":820,\"height\":615,\"caption\":\"Python program to check whether a number is Prime or not\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/entri.app\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Programming\",\"item\":\"https:\/\/entri.app\/blog\/category\/python-programming\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Prime Number Program in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/entri.app\/blog\/#website\",\"url\":\"https:\/\/entri.app\/blog\/\",\"name\":\"Entri Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/entri.app\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/entri.app\/blog\/#organization\",\"name\":\"Entri App\",\"url\":\"https:\/\/entri.app\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"width\":989,\"height\":446,\"caption\":\"Entri App\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/entri.me\/\",\"https:\/\/x.com\/entri_app\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/5c2c274e024447e3b9e8b4ee88389e4f\",\"name\":\"Kiranlal VT\",\"url\":\"https:\/\/entri.app\/blog\/author\/kiranlal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Prime Number Program in Python - Entri Blog","description":"Prime Number Program in Python - check whether a number entered by user is prime or not in Python","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/","og_locale":"en_US","og_type":"article","og_title":"Prime Number Program in Python - Entri Blog","og_description":"Prime Number Program in Python - check whether a number entered by user is prime or not in Python","og_url":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/","og_site_name":"Entri Blog","article_publisher":"https:\/\/www.facebook.com\/entri.me\/","article_published_time":"2022-10-18T14:30:58+00:00","article_modified_time":"2023-11-23T15:12:26+00:00","og_image":[{"width":820,"height":615,"url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png","type":"image\/png"}],"author":"Kiranlal VT","twitter_card":"summary_large_image","twitter_creator":"@entri_app","twitter_site":"@entri_app","twitter_misc":{"Written by":"Kiranlal VT","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#article","isPartOf":{"@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/"},"author":{"name":"Kiranlal VT","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/5c2c274e024447e3b9e8b4ee88389e4f"},"headline":"Prime Number Program in Python","datePublished":"2022-10-18T14:30:58+00:00","dateModified":"2023-11-23T15:12:26+00:00","mainEntityOfPage":{"@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/"},"wordCount":918,"commentCount":0,"publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"image":{"@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png","articleSection":["Articles","Coding","Entri Skilling","Python Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/","url":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/","name":"Prime Number Program in Python - Entri Blog","isPartOf":{"@id":"https:\/\/entri.app\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage"},"image":{"@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png","datePublished":"2022-10-18T14:30:58+00:00","dateModified":"2023-11-23T15:12:26+00:00","description":"Prime Number Program in Python - check whether a number entered by user is prime or not in Python","breadcrumb":{"@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#primaryimage","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/07\/Untitled1501.png","width":820,"height":615,"caption":"Python program to check whether a number is Prime or not"},{"@type":"BreadcrumbList","@id":"https:\/\/entri.app\/blog\/python-program-to-check-whether-a-number-is-prime-or-not\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/entri.app\/blog\/"},{"@type":"ListItem","position":2,"name":"Python Programming","item":"https:\/\/entri.app\/blog\/category\/python-programming\/"},{"@type":"ListItem","position":3,"name":"Prime Number Program in Python"}]},{"@type":"WebSite","@id":"https:\/\/entri.app\/blog\/#website","url":"https:\/\/entri.app\/blog\/","name":"Entri Blog","description":"","publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/entri.app\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/entri.app\/blog\/#organization","name":"Entri App","url":"https:\/\/entri.app\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","width":989,"height":446,"caption":"Entri App"},"image":{"@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/entri.me\/","https:\/\/x.com\/entri_app"]},{"@type":"Person","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/5c2c274e024447e3b9e8b4ee88389e4f","name":"Kiranlal VT","url":"https:\/\/entri.app\/blog\/author\/kiranlal\/"}]}},"_links":{"self":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25535012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/users\/91"}],"replies":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/comments?post=25535012"}],"version-history":[{"count":12,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25535012\/revisions"}],"predecessor-version":[{"id":25569037,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25535012\/revisions\/25569037"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media\/25535013"}],"wp:attachment":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media?parent=25535012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/categories?post=25535012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/tags?post=25535012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}