{"id":1949,"date":"2018-02-19T16:39:19","date_gmt":"2018-02-19T11:09:19","guid":{"rendered":"http:\/\/stepbystepschools.net\/?p=1949"},"modified":"2018-02-19T21:50:58","modified_gmt":"2018-02-19T16:20:58","slug":"create-first-program-in-python","status":"publish","type":"post","link":"https:\/\/www.stepbystepschools.net\/?p=1949","title":{"rendered":"Data Science Training Mumbai: &#8211; Running your first Python Program."},"content":{"rendered":"<h2>Contents:<\/h2>\n<p><a href=\"#What_is_Python\">What is Python?<\/a><\/p>\n<p><a href=\"#Creating_your_first_program_in_python\">Creating your first program in python<\/a><\/p>\n<p><a href=\"#What_are_the_advantages_of_using_python_for_Data_Science\">What are the advantages of using python for Data Science?<\/a><\/p>\n<p><a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg\" rel=\"attachment wp-att-1950\"><img loading=\"lazy\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg\" alt=\"1\" width=\"642\" height=\"307\" class=\"aligncenter size-full wp-image-1950\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg 642w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1-300x143.jpg 300w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><\/a><\/p>\n<h2><a name=\"What_is_Python\">What is Python?<\/a><\/h2>\n<p>Python is a beginner friendly simple programming language that was created between 1985- 1990 by Guido van Rossum.<\/p>\n<p>It may seem very basic and not that sophisticated as other languages but be assured that it has all the capabilities of other new and highly developed programming languages.<\/p>\n<p>Along with having all the features object oriented programming it is also has high-level data structures and is an interpreted scripting language.<\/p>\n<p>The python source code is available under the GNU General Public License (GPL) on its official website.<\/p>\n<p>Today the application of python are vastly diversified from Web development to data science.<\/p>\n<p>Python is easy to lean for beginner and easy to grip for experienced developers in a short duration.<\/p>\n<p>Python is available for development over most of the modern operating systems.<\/p>\n<p><a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/2.jpg\" rel=\"attachment wp-att-1951\"><img loading=\"lazy\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/2.jpg\" alt=\"2\" width=\"630\" height=\"318\" class=\"aligncenter size-full wp-image-1951\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/2.jpg 630w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/2-300x151.jpg 300w\" sizes=\"(max-width: 630px) 100vw, 630px\" \/><\/a><\/p>\n<h2><a name=\"Creating_your_first_program_in_python\">Creating your first program in python<\/a><\/h2>\n<p>To create and run our application in python we must set up a proper environment for it and install the necessary dependencies.<\/p>\n<p>Below are the necessary software which needs to be installed on your computer to create your first application in python:<\/p>\n<p><u><b>Steps:<\/b><\/u><\/p>\n<ol type=\"1\">\n<li>Visit <a target=\"_blank\" href=\"https:\/\/www.python.org\/downloads\/\">https:\/\/www.python.org\/downloads\/<\/a> and download one of the following versions.<\/li>\n<li>  <a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/3.jpg\" rel=\"attachment wp-att-1952\"><img loading=\"lazy\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/3.jpg\" alt=\"3\" width=\"575\" height=\"116\" class=\"alignleft size-full wp-image-1952\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/3.jpg 575w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/3-300x61.jpg 300w\" sizes=\"(max-width: 575px) 100vw, 575px\" \/><\/a><\/br>\n<p>I recommend going with Python 3.6.x version because 3.6.4 is the latest version which will most likely remain stable while 2.7.x is just released to support legacy code.<\/p>\n<\/li>\n<li>While installing python you need to select this option as it is very important and will help us further as we progress<br \/>\n<a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/4.jpg\" rel=\"attachment wp-att-1953\"><img loading=\"lazy\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/4.jpg\" alt=\"4\" width=\"588\" height=\"93\" class=\"alignleft size-full wp-image-1953\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/4.jpg 588w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/4-300x47.jpg 300w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/a><\/br><\/p>\n<p>After this click Install Now and let the software install itself<\/p>\n<\/li>\n<li>Now launch IDLE (Python 3.6 32 bit) which will be installed in your PC if everything is installed properly<\/li>\n<\/ol>\n<p>As we can see IDLE is just a python shell but if you want to you could write your code in a separate IDE as there are many paid and free IDE\u2019s for python but for this basic demonstration we will stick to this simple shell<\/p>\n<p>Now to creating your first program in python<\/p>\n<p>Python is similar to Pearl, Java and C in terms of syntax but however there are some key differences in this languages which we observe as we code.<\/br><br \/>\nTo print out code in our shell we need to write\n<\/p>\n<p>>>> <span style=\"background-color: #C0C0C0\">print (\u2018welcome to python\u2019)<\/span><\/p>\n<p>And now press enter to execute the above line<\/p>\n<p><a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/5.jpg\" rel=\"attachment wp-att-1954\"><img loading=\"lazy\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/5.jpg\" alt=\"5\" width=\"492\" height=\"65\" class=\"alignleft size-full wp-image-1954\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/5.jpg 492w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/5-300x40.jpg 300w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/a><\/p>\n<p>You will see the output in your next line <\/p>\n<p>You can save you code on your machine by providing the file name and adding<br \/>\n<span style=\"background-color: #C0C0C0\">.py<\/span> extension which marks it as python file.<\/p>\n<p><a href=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/6.jpg\" rel=\"attachment wp-att-1955\"><img loading=\"lazy\" src=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/6.jpg\" alt=\"6\" width=\"602\" height=\"52\" class=\"alignleft size-full wp-image-1955\" srcset=\"https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/6.jpg 602w, https:\/\/www.stepbystepschools.net\/wp-content\/uploads\/2018\/02\/6-300x26.jpg 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/a><\/p>\n<p>Below is the code to know a data type of a particular value and to add two numbers<\/p>\n<p><span style=\"background-color: #C0C0C0\">>>> print(type(&#8216;hello&#8217;))<\/span><\/p>\n<p><span style=\"background-color: #00FF00\">&#60;class &#8216;str&#8217;&#62;<\/span><\/p>\n<p><span style=\"background-color: #C0C0C0\">>>> print(type(3))<\/span><\/p>\n<p><span style=\"background-color: #00FF00\">&#60;class &#8216;int&#8217;&#62;<\/span><\/p>\n<p><span style=\"background-color: #C0C0C0\">>>> print(type(3.8))<\/span><\/p>\n<p><span style=\"background-color: #00FF00\">&#60;class &#8216;float&#8217;&#62;<\/span><\/p>\n<p><span style=\"background-color: #C0C0C0\">>>> a=25<\/span><\/p>\n<p><span style=\"background-color: #C0C0C0\">>>> b=35<\/span><\/p>\n<p><span style=\"background-color: #C0C0C0\">>>> print(a+b)<\/span><\/p>\n<p><span style=\"background-color: #00FF00\">60<\/span><\/p>\n<p>In the above lines of code output is marked in Green<\/p>\n<h2><a name=\"What_are_the_advantages_of_using_python_for_Data_Science\">What are the advantages of using python for Data Science?<\/a><\/h2>\n<p>Data Science requires a language to be simple, easy to learn, being highly readable and having an abundance of good libraries.<\/p>\n<p>All the above requirements are ticked in python.<\/p>\n<p>Python also has very powerful statistical and numerical packages already available with a huge community support.<\/p>\n<ul>\n<li><b>Pandas<\/b> and <b>NumPy<\/b> (Python Data Analysis Library): This libraries allow us to read\/manipulate data efficiently and easily. NumPy has evolved from <b>Numeric<\/b> which has been in development since mid-1990.<\/li>\n<li><b>Matplotlib:<\/b> This allows us to create useful and powerful data visualizations. <\/li>\n<li><b>Scikit-learn:<\/b> It is a special library that enables us to train and apply machine learning algorithms to your data and make predictions. <\/li>\n<li><b>Cython:<\/b> This library allows us to convert our python code and then run the code in C environment to effectively reduce the runtime and improve our general model performance.<\/li>\n<li><b>PyMySQ:<\/b> This library allows us to easily connect to MySQL database, extract data and execute queries.<\/li>\n<li><b>BeautifulSoup:<\/b> It can be used to easily read in XML and HTML type data which is quite common nowadays.<\/li>\n<li><b>iPython:<\/b> IPython notebook provides us with a web-based interactive environment just like R programming<\/li>\n<\/ul>\n<p>Python in general had a very long history of being supported by large community of developers for Data science and numerical analytics.<\/p>\n<p><a target=\"_blank\" href=\"http:\/\/stepbystepschools.net\/?page_id=1842\">Syllabus of Data Science training in Mumbai<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents: What is Python? Creating your first program in python What are the advantages of using python for Data Science? What is Python? Python is a beginner friendly simple programming language that was created between 1985- 1990 by Guido van &hellip; <a href=\"https:\/\/www.stepbystepschools.net\/?p=1949\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[1],"tags":[198,199],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Data Science Training Mumbai: - Running your first Python Program. - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai<\/title>\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.stepbystepschools.net\/?p=1949\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Data Science Training Mumbai: - Running your first Python Program. - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\" \/>\n<meta property=\"og:description\" content=\"Contents: What is Python? Creating your first program in python What are the advantages of using python for Data Science? What is Python? Python is a beginner friendly simple programming language that was created between 1985- 1990 by Guido van &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.stepbystepschools.net\/?p=1949\" \/>\n<meta property=\"og:site_name\" content=\"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-19T11:09:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-19T16:20:58+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"StepByStepSchoolsSupport\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.stepbystepschools.net\/#website\",\"url\":\"https:\/\/www.stepbystepschools.net\/\",\"name\":\"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\",\"description\":\"MVC 5\/Core, AngularJS 1.x, 2.0, 4.0, Design Pattern, Architecture, SSIS, SSAS, SSRS, Data Science, Big data, Hadoop classroom training\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.stepbystepschools.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=1949#primaryimage\",\"url\":\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg\",\"contentUrl\":\"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=1949#webpage\",\"url\":\"https:\/\/www.stepbystepschools.net\/?p=1949\",\"name\":\"Data Science Training Mumbai: - Running your first Python Program. - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai\",\"isPartOf\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=1949#primaryimage\"},\"datePublished\":\"2018-02-19T11:09:19+00:00\",\"dateModified\":\"2018-02-19T16:20:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/7131e4ee1c5673879e6029d14ec2f655\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=1949#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.stepbystepschools.net\/?p=1949\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.stepbystepschools.net\/?p=1949#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.stepbystepschools.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data Science Training Mumbai: &#8211; Running your first Python Program.\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/7131e4ee1c5673879e6029d14ec2f655\",\"name\":\"StepByStepSchoolsSupport\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cecaf2a0ee369391127b0159c266979d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cecaf2a0ee369391127b0159c266979d?s=96&d=mm&r=g\",\"caption\":\"StepByStepSchoolsSupport\"},\"url\":\"https:\/\/www.stepbystepschools.net\/?author=40\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Data Science Training Mumbai: - Running your first Python Program. - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","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.stepbystepschools.net\/?p=1949","og_locale":"en_US","og_type":"article","og_title":"Data Science Training Mumbai: - Running your first Python Program. - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","og_description":"Contents: What is Python? Creating your first program in python What are the advantages of using python for Data Science? What is Python? Python is a beginner friendly simple programming language that was created between 1985- 1990 by Guido van &hellip; Continue reading &rarr;","og_url":"https:\/\/www.stepbystepschools.net\/?p=1949","og_site_name":"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","article_published_time":"2018-02-19T11:09:19+00:00","article_modified_time":"2018-02-19T16:20:58+00:00","og_image":[{"url":"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"StepByStepSchoolsSupport","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.stepbystepschools.net\/#website","url":"https:\/\/www.stepbystepschools.net\/","name":"Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","description":"MVC 5\/Core, AngularJS 1.x, 2.0, 4.0, Design Pattern, Architecture, SSIS, SSAS, SSRS, Data Science, Big data, Hadoop classroom training","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.stepbystepschools.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stepbystepschools.net\/?p=1949#primaryimage","url":"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg","contentUrl":"http:\/\/stepbystepschools.net\/wp-content\/uploads\/2018\/02\/1.jpg"},{"@type":"WebPage","@id":"https:\/\/www.stepbystepschools.net\/?p=1949#webpage","url":"https:\/\/www.stepbystepschools.net\/?p=1949","name":"Data Science Training Mumbai: - Running your first Python Program. - Learn MVC, Angular, Architecture, MSBI, Data Science in Mumbai","isPartOf":{"@id":"https:\/\/www.stepbystepschools.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.stepbystepschools.net\/?p=1949#primaryimage"},"datePublished":"2018-02-19T11:09:19+00:00","dateModified":"2018-02-19T16:20:58+00:00","author":{"@id":"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/7131e4ee1c5673879e6029d14ec2f655"},"breadcrumb":{"@id":"https:\/\/www.stepbystepschools.net\/?p=1949#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.stepbystepschools.net\/?p=1949"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.stepbystepschools.net\/?p=1949#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.stepbystepschools.net\/"},{"@type":"ListItem","position":2,"name":"Data Science Training Mumbai: &#8211; Running your first Python Program."}]},{"@type":"Person","@id":"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/7131e4ee1c5673879e6029d14ec2f655","name":"StepByStepSchoolsSupport","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stepbystepschools.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cecaf2a0ee369391127b0159c266979d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cecaf2a0ee369391127b0159c266979d?s=96&d=mm&r=g","caption":"StepByStepSchoolsSupport"},"url":"https:\/\/www.stepbystepschools.net\/?author=40"}]}},"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts\/1949"}],"collection":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1949"}],"version-history":[{"count":9,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts\/1949\/revisions"}],"predecessor-version":[{"id":1984,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=\/wp\/v2\/posts\/1949\/revisions\/1984"}],"wp:attachment":[{"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stepbystepschools.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}