{"id":114,"date":"2021-08-17T21:57:07","date_gmt":"2021-08-18T03:57:07","guid":{"rendered":"https:\/\/thenontechieguy.com\/?p=114"},"modified":"2021-08-17T21:58:45","modified_gmt":"2021-08-18T03:58:45","slug":"getting-started-with-python","status":"publish","type":"post","link":"https:\/\/thenontechieguy.com\/index.php\/2021\/08\/17\/getting-started-with-python\/","title":{"rendered":"Getting started with Python!"},"content":{"rendered":"\n<p>In this post we will see how we can start writing  simple code in Python using Eclipse IDE!  <\/p>\n\n\n\n<p>You may refer to the below post to understand the pre-requisites you need to start working with Python!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-thenontechieguy wp-block-embed-thenontechieguy\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"bas5qNsmq6\"><a href=\"https:\/\/thenontechieguy.com\/index.php\/2021\/08\/16\/is-your-laptop-data-science-ready\/\">Is your Laptop &#8216;Data Science&#8217; Ready?<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Is your Laptop &#8216;Data Science&#8217; Ready?&#8221; &#8212; thenontechieguy\" src=\"https:\/\/thenontechieguy.com\/index.php\/2021\/08\/16\/is-your-laptop-data-science-ready\/embed\/#?secret=bas5qNsmq6\" data-secret=\"bas5qNsmq6\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><figcaption>The first step is to open the Eclipse IDE (stating the obvious here :D)<\/figcaption><\/figure>\n\n\n\n<p>You will see a screen like the one below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Start-Page-1024x576.png\" alt=\"\" class=\"wp-image-115\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Start-Page-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Start-Page-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Start-Page-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Start-Page-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Start-Page.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>For writing code in Python, we need to first setup a new &#8220;Project&#8221;.<\/figcaption><\/figure>\n\n\n\n<p>For this Go to File-> New->Project and Select Wizard as Pydev-> Pydev Project <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Pydev-Project-1024x576.png\" alt=\"\" class=\"wp-image-116\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Pydev-Project-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Pydev-Project-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Pydev-Project-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Pydev-Project-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Pydev-Project.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click &#8216;Next&#8217; and provide the following:<\/p>\n\n\n\n<p>Project Name: MyFirstPythonProject<\/p>\n\n\n\n<p>Rest of the default information need not be changed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/image-1024x576.png\" alt=\"\" class=\"wp-image-117\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/image-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/image-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/image-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/image-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/image.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then Click &#8220;Finish&#8221;<\/p>\n\n\n\n<p>The New Python Project will be displayed as below<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Project-1-1024x576.png\" alt=\"\" data-id=\"120\" data-full-url=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Project-1.png\" data-link=\"https:\/\/thenontechieguy.com\/?attachment_id=120#main\" class=\"wp-image-120\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Project-1-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Project-1-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Project-1-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Project-1-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Project-1.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>Right Click on the project name and Choose New-> PyDev<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1024x576.png\" alt=\"\" class=\"wp-image-121\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Add Name of the module and Click &#8216;Finish&#8217;<\/figcaption><\/figure>\n\n\n\n<p>Choose Template as &#8216;Empty&#8217; and Click &#8216;OK&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1-1024x576.png\" alt=\"\" data-id=\"122\" data-full-url=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1.png\" data-link=\"https:\/\/thenontechieguy.com\/?attachment_id=122#main\" class=\"wp-image-122\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Module-1.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>The below screen is now displayed. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Module-2-1024x576.png\" alt=\"\" class=\"wp-image-123\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Module-2-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Module-2-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Module-2-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Module-2-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Module-2.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We are now ready to start writing Python Code.<\/p>\n\n\n\n<p>The first and the obvious program that we will attempt is &#8220;Hello World&#8221;<\/p>\n\n\n\n<p>Write the following command <\/p>\n\n\n\n<p>print(&#8220;Hello World&#8221;)<\/p>\n\n\n\n<p>Now Click Run-> Run As-> 1. Python Run<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-1024x576.png\" alt=\"\" class=\"wp-image-124\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click Ok on the &#8216;Save and Launch Screen&#8217; as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-2-1024x576.png\" alt=\"\" class=\"wp-image-125\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-2-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-2-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-2-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-2-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Run-2.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The output of the program -&#8220;Hello World&#8221; is displayed on the Console as output<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Output-1024x576.png\" alt=\"\" class=\"wp-image-126\" srcset=\"https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Output-1024x576.png 1024w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Output-300x169.png 300w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Output-768x432.png 768w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Output-1536x864.png 1536w, https:\/\/thenontechieguy.com\/wp-content\/uploads\/2021\/08\/Eclipse-Python-Output.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Congrats you have written your first program in Python.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this post we will see how we can start writing simple code in Python using Eclipse IDE! You may refer to the below post&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,12],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-hello-world","category-python"],"_links":{"self":[{"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":2,"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":127,"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions\/127"}],"wp:attachment":[{"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thenontechieguy.com\/index.php\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}