{"id":17,"date":"2023-03-30T04:56:52","date_gmt":"2023-03-30T04:56:52","guid":{"rendered":"http:\/\/www.programminginpython.com\/2023\/03\/30\/python-program-to-print-pattern-of-letter-p\/"},"modified":"2023-05-22T14:07:48","modified_gmt":"2023-05-22T14:07:48","slug":"python-program-print-pattern-letter-p","status":"publish","type":"post","link":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/","title":{"rendered":"Python Program to print pattern of letter P"},"content":{"rendered":"<p>Hello everyone! Welcome back to <a href=\"https:\/\/www.programminginpython.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">programminginpython.com<\/a>. I am continuing with this pattern programming series, here I will tell you how to print the pattern of the letter P. In the <a href=\"https:\/\/www.programminginpython.com\/category\/alphabet-patterns\/\" target=\"_blank\" rel=\"noopener noreferrer\">previous tutorials<\/a>, I have shown you the <a href=\"https:\/\/www.youtube.com\/watch?v=PfhTvGB5RCY&amp;list=PLrKr3rQwMgsiLQ__JeCz_Vvr5pbk6pILT&amp;index=1&amp;ab_channel=ProgramminginPython\" target=\"_blank\" rel=\"noopener noreferrer\">patterns of letters A to O<\/a>. Here it\u2019s now time for Pattern P. <strong>You can check the complete series on letter patterns <a href=\"https:\/\/www.programminginpython.com\/category\/alphabet-patterns\/\" target=\"_blank\" rel=\"noopener noreferrer\">here.<\/a><\/strong><\/p>\n<p class=\"extra_btn_para\"><span class=\"wdg\"> <a href=\"https:\/\/git.io\/JLFcK\" target=\"_blank\" rel=\"noopener noreferrer\"> <i class=\"fa fa-github fa-lg\"><\/i> Program on Github<\/a><\/span><\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Master the basics of data analysis in Python. Expand your skillset by learning scientific computing with numpy.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Take the course on Introduction to Python on <span style=\"color: #ffd343;\"><a style=\"color: #ffd343;\" href=\"https:\/\/bit.ly\/join_datacamp\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">DataCamp<\/a><\/span> here <\/span><span style=\"color: #ffd343;\"><a style=\"color: #ffd343;\" href=\"https:\/\/bit.ly\/datacamp-intro-to-python\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/bit.ly\/datacamp-intro-to-python<\/a><\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<div class=\"yrc-shell-cover yrc-single\" data-yrc-uid=\"69e0e9280d3ed\" data-yrc-channel=\"{&quot;meta&quot;:{&quot;user&quot;:&quot;Programming In Python&quot;,&quot;channel&quot;:&quot;UCLBlXUMLYLxopRljNdLXOeQ&quot;,&quot;key&quot;:&quot;yrc_1683138754&quot;,&quot;apikey&quot;:&quot;AIzaSyC3vU6rFyzsO0shrRsAWmjuSiuWYTQhafc&quot;,&quot;cache&quot;:&quot;1440&quot;,&quot;channel_uploads&quot;:&quot;UULBlXUMLYLxopRljNdLXOeQ&quot;,&quot;onlyonce&quot;:&quot;&quot;,&quot;tag&quot;:&quot;&quot;,&quot;per_page&quot;:&quot;24&quot;,&quot;maxv&quot;:&quot;0&quot;,&quot;consent&quot;:{&quot;ask&quot;:&quot;&quot;,&quot;url&quot;:&quot;&quot;},&quot;ads&quot;:&quot;1&quot;,&quot;uid&quot;:&quot;69e0e9280d3ed&quot;,&quot;nocookie&quot;:&quot;&quot;,&quot;single&quot;:true},&quot;style&quot;:{&quot;colors&quot;:{&quot;item&quot;:{&quot;background&quot;:&quot;inherit&quot;},&quot;button&quot;:{&quot;background&quot;:&quot;#333&quot;,&quot;color&quot;:&quot;#fff&quot;},&quot;color&quot;:{&quot;text&quot;:&quot;#fff&quot;,&quot;link&quot;:&quot;inherit&quot;,&quot;menu&quot;:&quot;#000&quot;,&quot;meta&quot;:&quot;inherit&quot;}},&quot;theme&quot;:{&quot;videos&quot;:{&quot;style&quot;:&quot;__grid&quot;,&quot;thumb&quot;:[&quot;large&quot;,&quot;open&quot;],&quot;desc&quot;:&quot;&quot;,&quot;carousel&quot;:{&quot;thumbs&quot;:&quot;4&quot;,&quot;thumbs_to_slide&quot;:&quot;2&quot;,&quot;spacing&quot;:&quot;10&quot;},&quot;carousel_nav&quot;:{&quot;modifier&quot;:&quot;__sides&quot;,&quot;position&quot;:&quot;left-none&quot;,&quot;location&quot;:&quot;prepend&quot;,&quot;background&quot;:&quot;#fff&quot;,&quot;color&quot;:&quot;#000&quot;,&quot;font_size&quot;:&quot;2&quot;,&quot;border_radius&quot;:&quot;0&quot;}},&quot;a&quot;:&quot;1&quot;},&quot;fit&quot;:&quot;false&quot;,&quot;playlists&quot;:&quot;true&quot;,&quot;uploads&quot;:&quot;true&quot;,&quot;player_mode&quot;:&quot;1&quot;,&quot;truncate&quot;:&quot;&quot;,&quot;banner&quot;:&quot;true&quot;,&quot;thumb_margin&quot;:&quot;8&quot;,&quot;play_icon&quot;:&quot;hover&quot;,&quot;youtube_play_icon&quot;:&quot;&quot;,&quot;thumb_image_size&quot;:&quot;medium&quot;,&quot;default_tab&quot;:&quot;uploads&quot;,&quot;sticky&quot;:{&quot;enable&quot;:&quot;&quot;,&quot;width&quot;:&quot;400&quot;,&quot;position&quot;:&quot;bottom-right&quot;,&quot;only_above&quot;:&quot;768&quot;,&quot;margin&quot;:&quot;12&quot;},&quot;player&quot;:{&quot;show_desc&quot;:&quot;&quot;,&quot;show_meta&quot;:&quot;&quot;},&quot;menu&quot;:&quot;1&quot;,&quot;rating_style&quot;:&quot;NaN&quot;,&quot;rtl&quot;:false}}\" data-yrc-setup=\"\"><\/div>\r\n\t\t\t<script data-cfasync=\"false\" type=\"text\/javascript\">\r\n\t\t\t\tif( !window.YRC ) var YRC = {Data:{}};\r\n\t\t\t\tYRC.Data[\"69e0e9280d3ed\"] = {\"video\":\"VVDf4VhZpFc\"};\r\n\t\t\t\t(function(){\r\n\t\t\t\t\tif(!YRC.loaded){\r\n\t\t\t\t\t    YRC.loaded = true;\r\n\t\t\t\t\t\tfunction YRC_Loader(){\r\n\t\t\t\t\t\t\t\/\/YRC.loaded = true;\r\n\t\t\t\t\t\t\tYRC.is_pro = false;\r\n\t\t\t\t\t\t\tYRC.is_pb = false;\r\n\t\t\t\t\t\t\tYRC.lang = {\"form\":{\"Videos\":\"Videos\",\"Playlists\":\"Playlists\",\"Search\":\"Search\",\"Loading\":\"Loading\",\"more\":\"more\",\"Nothing_found\":\"Nothing found\",\"Prev\":\"Previous\",\"Next\":\"Next\",\"consent_statement\":\"Allow cookies?\",\"consent_button\":\"Allow\",\"consent_privacy_policy\":\"Privacy policy\"},\"fui\":{\"sort_by\":\"Sort by\",\"relevant\":\"Relevant\",\"latest\":\"Latest\",\"liked\":\"Liked\",\"title\":\"Title\",\"views\":\"Views\",\"duration\":\"Duration\",\"any\":\"Any\",\"_short\":\"Short\",\"medium\":\"Medium\",\"_long\":\"Long\",\"uploaded\":\"Uploaded\",\"all_time\":\"All time\",\"live_now\":\"Live Now\",\"today\":\"Today\",\"ago\":\"ago\",\"last\":\"Last\",\"day\":\"day\",\"days\":\"days\",\"week\":\"week\",\"weeks\":\"weeks\",\"month\":\"month\",\"months\":\"months\",\"year\":\"year\",\"years\":\"years\",\"older\":\"Older\",\"show_more\":\"Show More\",\"show_less\":\"Show Less\",\"reply\":\"REPLY\",\"view_replies\":\"View replies\",\"write_comment\":\"Write comment...\",\"billion\":\"B\",\"million\":\"M\",\"thousand\":\"K\",\"max_plain_number\":1000,\"wplocale\":\"en_US\"}};\r\n\t\t\t\t\t\t\tYRC.is_admin = false;\r\n\t\t\t\t\t\t\tvar script = document.createElement(\"script\");\r\n\t\t\t\t\t\t\t\tscript.setAttribute(\"data-cfasync\", \"false\");\r\n\t\t\t\t\t\t\t\tscript.setAttribute(\"type\", \"text\/javascript\");\r\n\t\t\t\t\t\t\t\tscript.src = \"https:\/\/www.programminginpython.com\/wp-content\/plugins\/yourchannel\/js\/yrc.js?1.2.9\";\r\n\t\t\t\t\t\t\t\tscript.id = \"yrc-script\";\r\n\t\t\t\t\t\t\t\tdocument.querySelector(\"head\").appendChild(script);\r\n\t\t\t\t\t\t\tvar style = document.createElement(\"link\");\r\n\t\t\t\t\t\t\t\tstyle.rel = \"stylesheet\";\r\n\t\t\t\t\t\t\t\tstyle.href = \"https:\/\/www.programminginpython.com\/wp-content\/plugins\/yourchannel\/css\/style.css?1.2.9\";\r\n\t\t\t\t\t\t\t\tstyle.type = \"text\/css\";\r\n\t\t\t\t\t\t\t\tdocument.querySelector(\"head\").appendChild(style);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(window.jQuery){YRC_Loader();}else { var yrctimer2324 = window.setInterval(function(){\r\n\t\t\t\t\t\t\tif(window.jQuery){YRC_Loader(); window.clearInterval(yrctimer2324); }\r\n\t\t\t\t\t\t}, 250);}\r\n\t\t\t\t\t} else {if(YRC.EM)YRC.EM.trigger(\"yrc.newchannel\");}\r\n\t\t\t\t}());<\/script>\n<p style=\"text-align: center;\"><strong>You can also watch the video on YouTube <a href=\"https:\/\/youtu.be\/VVDf4VhZpFc\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/strong><\/p>\n<h4 class=\"post_h4 visualize_iframe\">Print Pattern P \u2013 Code Visualization<\/h4>\n<p><center><iframe width=\"800\" height=\"500\" frameborder=\"0\" src=\"https:\/\/pythontutor.com\/iframe-embed.html#code=%23%20Python3%20program%20to%20print%20alphabet%20pattern%20P%0A%0A%23%20%20%20*%20*%20*%20*%20*%20*%20*%20*%20*%20*%0A%23%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*%0A%23%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*%0A%23%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*%0A%23%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*%0A%23%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*%0A%23%20*%20*%20*%20*%20*%20*%20*%20*%20*%20*%20*%0A%23%20*%0A%23%20*%0A%23%20*%0A%23%20*%0A%0A%0Adef%20print_pattern%28n%29%3A%0A%20%20%20%20for%20row%20in%20range%28n%29%3A%0A%20%20%20%20%20%20%20%20for%20column%20in%20range%28n%29%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20first%20row%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28row%20%3D%3D%200%20and%20%28column%20!%3D%200%20and%20column%20!%3D%20n-1%29%29%20or%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20middle%20row%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28row%20%3D%3D%20n\/\/2%20and%20column%20!%3D%20n-1%29%20or%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20first%20column%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28column%20%3D%3D%200%20and%20%28row%20!%3D0%20and%20row%20!%3D%20n-1%29%29%20or%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20last%20column%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28column%20%3D%3D%20n-1%20and%20row%20%3C%20n\/\/2%20and%20row%20!%3D%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%29%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print%28%22*%22,%20end%3D%22%20%22%29%0A%20%20%20%20%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print%28%22%20%22,%20end%3D%22%20%22%29%0A%20%20%20%20%20%20%20%20print%28%29%0A%0Asize%20%3D%20int%28input%28%22Enter%20a%20size%3A%5Ct%22%29%29%0A%0Aif%20size%20%3C%208%3A%0A%20%20%20%20print%28%22Enter%20a%20size%20minumin%20of%208%22%29%0Aelse%3A%0A%20%20%20%20print_pattern%28size%29&#038;codeDivHeight=400&#038;codeDivWidth=350&#038;cumulative=false&#038;curInstr=0&#038;heapPrimitives=nevernest&#038;origin=opt-frontend.js&#038;py=3&#038;rawInputLstJSON=%5B%5D&#038;textReferences=false\"> <\/iframe><\/center><\/p>\n<h4 class=\"post_h4\">Task:<\/h4>\n<p>Python program to print the pattern of the letter <b>P.<\/b><\/p>\n<h4 class=\"post_h4\">Approach:<\/h4>\n<ul>\n<li>Read an input integer for asking the size of the letter using <span title=\"in Python 3\"><code>input()<\/code><\/span><\/li>\n<li>Check if the entered number is greater than 8,\n<ul>\n<li>if yes, call the function <code>print_pattern()<\/code><\/li>\n<li>else, show a message to enter a number that is greater or equal to 8<\/li>\n<\/ul>\n<\/li>\n<li>print_pattern()\n<ul>\n<li>here we only do two things, print star(<code>*<\/code>) and print space(<code> <\/code>), just writing conditions so the pattern of <code>*<\/code>\u2018s and <code> <\/code>\u2018s will display the pattern O<\/li>\n<li>following are 4 conditions for printing *\u2019s<br \/>\nWe have 2 loops, an outer loop() for rows, and an inner loop for columns.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># Outer for loop\r\n    for row in range(n): \r\n        # Inner for loop \r\n        for column in range(n):<\/pre>\n<p>Print first row<br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">row == 0 and (column != 0 and column != n-1)<\/code><\/p>\n<p>Print middle row<br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">row == n\/\/2 and column != n-1<br \/>\n<\/code><\/p>\n<p>Print first column<br \/>\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">column == 0 and (row !=0 and row != n-1)<br \/>\n<\/code><\/p>\n<p>Print last column<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">column == n-1 and row &lt; n\/\/2 and row != 0<br \/>\n<\/code><\/p>\n<ul>\n<li>print <code> <\/code> in remaining all cases.<\/li>\n<\/ul>\n<p class=\"extra_btn_para\"><span class=\"wdg\"> <a href=\"https:\/\/git.io\/JLFcK\" target=\"_blank\" rel=\"noopener noreferrer\"> <i class=\"fa fa-github fa-lg\"><\/i> Program on GitHub<\/a><\/span><\/p>\n<h4 class=\"post_h4\">Program:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">__author__ = 'Avinash'\r\n\r\n\r\n# Python3 program to print alphabet pattern P\r\n\r\n#   * * * * * * * * * *\r\n# *                     *\r\n# *                     *\r\n# *                     *\r\n# *                     *\r\n# *                     *\r\n# * * * * * * * * * * *\r\n# *\r\n# *\r\n# *\r\n# *\r\n\r\n\r\ndef print_pattern(n):\r\n    for row in range(n):\r\n        for column in range(n):\r\n            if (\r\n              # first row\r\n              (row == 0 and (column != 0 and column != n-1)) or\r\n\r\n              # middle row\r\n              (row == n\/\/2 and column != n-1) or\r\n\r\n              # first column\r\n              (column == 0 and (row !=0 and row != n-1)) or\r\n\r\n              # last column\r\n              (column == n-1 and row &lt; n\/\/2 and row != 0)\r\n            ):\r\n                print(\"*\", end=\" \")\r\n            else:\r\n                print(\" \", end=\" \")\r\n        print()\r\n\r\nsize = int(input(\"Enter a size:\\t\"))\r\n\r\nif size &lt; 8:\r\n    print(\"Enter a size minumin of 8\")\r\nelse:\r\n    print_pattern(size)\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h4 class=\"post_h4\">Output:<\/h4>\n<figure id=\"attachment_587\" aria-describedby=\"caption-attachment-587\" style=\"width: 368px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"size-full wp-image-587 lazyload\" data-src=\"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/o1.png\" alt=\"Python Program to print pattern of Letter P\" width=\"368\" height=\"340\" data-srcset=\"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/o1.png 368w, https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/o1.png 300w\" data-sizes=\"(max-width: 368px) 100vw, 368px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 368px; --smush-placeholder-aspect-ratio: 368\/340;\" \/><figcaption id=\"caption-attachment-587\" class=\"wp-caption-text\">Python Program to print pattern of Letter P<\/figcaption><\/figure>\n<p class=\"extra_btn_para\"><span class=\"wdg\"> <a href=\"https:\/\/git.io\/JLFcK\" target=\"_blank\" rel=\"noopener noreferrer\"> <i class=\"fa fa-github fa-lg\"><\/i> Program on GitHub<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone! Welcome back to programminginpython.com. I am continuing with this pattern programming series, here I will tell you how to print the pattern of the letter P. In the previous tutorials, I have shown &hellip;<\/p>\n","protected":false},"author":1,"featured_media":350,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[106,74,107,72],"class_list":["post-17","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-letter-patterns","category-pattern-programming","tag-letter-p","tag-letter-patterns","tag-pattern-p","tag-pattern-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python Program to print pattern of letter P - Programming In Python<\/title>\n<meta name=\"description\" content=\"Pattern of letter P is printed using for loops by looping for columns and rows, printing *&#039;s &#039; &#039;&#039;s based on pattern of letter P\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Program to print pattern of letter P - Programming In Python\" \/>\n<meta property=\"og:description\" content=\"Pattern of letter P is printed using for loops by looping for columns and rows, printing *&#039;s &#039; &#039;&#039;s based on pattern of letter P\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/\" \/>\n<meta property=\"og:site_name\" content=\"Programming In Python\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/programminginpython\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-30T04:56:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-22T14:07:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/PIP_FB_Pattern_P.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"AVINASH NETHALA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@python_pip\" \/>\n<meta name=\"twitter:site\" content=\"@python_pip\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"AVINASH NETHALA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Program to print pattern of letter P - Programming In Python","description":"Pattern of letter P is printed using for loops by looping for columns and rows, printing *'s ' ''s based on pattern of letter P","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:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/","og_locale":"en_US","og_type":"article","og_title":"Python Program to print pattern of letter P - Programming In Python","og_description":"Pattern of letter P is printed using for loops by looping for columns and rows, printing *'s ' ''s based on pattern of letter P","og_url":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/","og_site_name":"Programming In Python","article_publisher":"https:\/\/www.facebook.com\/programminginpython","article_published_time":"2023-03-30T04:56:52+00:00","article_modified_time":"2023-05-22T14:07:48+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/PIP_FB_Pattern_P.png","type":"image\/png"}],"author":"AVINASH NETHALA","twitter_card":"summary_large_image","twitter_creator":"@python_pip","twitter_site":"@python_pip","twitter_misc":{"Written by":"AVINASH NETHALA","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#article","isPartOf":{"@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/"},"author":{"name":"AVINASH NETHALA","@id":"https:\/\/www.programminginpython.com\/#\/schema\/person\/9a3c14fe46d422ebf783ee61de1e788c"},"headline":"Python Program to print pattern of letter P","datePublished":"2023-03-30T04:56:52+00:00","dateModified":"2023-05-22T14:07:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/"},"wordCount":263,"commentCount":0,"publisher":{"@id":"https:\/\/www.programminginpython.com\/#organization"},"image":{"@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#primaryimage"},"thumbnailUrl":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/LetterP_WP_Featured1.png","keywords":["letter P","letter patterns","pattern P","pattern programming"],"articleSection":["Letter Patterns","Pattern Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/","url":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/","name":"Python Program to print pattern of letter P - Programming In Python","isPartOf":{"@id":"https:\/\/www.programminginpython.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#primaryimage"},"image":{"@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#primaryimage"},"thumbnailUrl":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/LetterP_WP_Featured1.png","datePublished":"2023-03-30T04:56:52+00:00","dateModified":"2023-05-22T14:07:48+00:00","description":"Pattern of letter P is printed using for loops by looping for columns and rows, printing *'s ' ''s based on pattern of letter P","breadcrumb":{"@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#primaryimage","url":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/LetterP_WP_Featured1.png","contentUrl":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/LetterP_WP_Featured1.png","width":1920,"height":400,"caption":"Python Program to print pattern of letter P"},{"@type":"BreadcrumbList","@id":"https:\/\/www.programminginpython.com\/python-program-print-pattern-letter-p\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.programminginpython.com\/"},{"@type":"ListItem","position":2,"name":"Python Program to print pattern of letter P"}]},{"@type":"WebSite","@id":"https:\/\/www.programminginpython.com\/#website","url":"https:\/\/www.programminginpython.com\/","name":"Programming In Python","description":"All About Python","publisher":{"@id":"https:\/\/www.programminginpython.com\/#organization"},"alternateName":"pip","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.programminginpython.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.programminginpython.com\/#organization","name":"Programming In Python","alternateName":"PIP","url":"https:\/\/www.programminginpython.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.programminginpython.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/04\/pip_logo_500_500.png","contentUrl":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/04\/pip_logo_500_500.png","width":500,"height":500,"caption":"Programming In Python"},"image":{"@id":"https:\/\/www.programminginpython.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/programminginpython","https:\/\/x.com\/python_pip","https:\/\/www.youtube.com\/programminginpython","https:\/\/github.com\/avinashn\/programminginpython.com"]},{"@type":"Person","@id":"https:\/\/www.programminginpython.com\/#\/schema\/person\/9a3c14fe46d422ebf783ee61de1e788c","name":"AVINASH NETHALA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.programminginpython.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ed52e7670d7db94820c7430d324103ccdecb16d86611d5b29064aa9ce25a958b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed52e7670d7db94820c7430d324103ccdecb16d86611d5b29064aa9ce25a958b?s=96&d=mm&r=g","caption":"AVINASH NETHALA"},"sameAs":["https:\/\/www.programminginpython.com\/"],"url":"https:\/\/www.programminginpython.com\/author\/avinash\/"}]}},"jetpack_featured_media_url":"https:\/\/www.programminginpython.com\/wp-content\/uploads\/2023\/03\/LetterP_WP_Featured1.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":6,"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":870,"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/posts\/17\/revisions\/870"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/media\/350"}],"wp:attachment":[{"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.programminginpython.com\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}