<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aatmaj</title>
    <description>The latest articles on DEV Community by Aatmaj (@aatmaj).</description>
    <link>https://dev.to/aatmaj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F621739%2F3fc11870-58b9-452b-9eef-c1a59368e102.png</url>
      <title>DEV Community: Aatmaj</title>
      <link>https://dev.to/aatmaj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aatmaj"/>
    <language>en</language>
    <item>
      <title>Cool Github repositories for Everyone</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Thu, 29 Dec 2022 10:43:24 +0000</pubDate>
      <link>https://dev.to/aatmaj/cool-github-repositories-for-everyone-b8p</link>
      <guid>https://dev.to/aatmaj/cool-github-repositories-for-everyone-b8p</guid>
      <description>&lt;h3&gt;
  
  
  📒 Useful repositories for every developer!!
&lt;/h3&gt;

&lt;p&gt;This is a hand picked and carefully curated collection of cool github repositories. These repositories offer many courses/tutorials/materials for learning a variety of stuff! &lt;/p&gt;

&lt;p&gt;So what are we waiting for! Let's get started! &lt;/p&gt;

&lt;h6&gt;
  
  
  Dont forget to  star the &lt;a href="https://github.com/Aatmaj-Zephyr/A-collection-of-useful-repositories" rel="noopener noreferrer"&gt;Original github repo&lt;/a&gt; 🤩
&lt;/h6&gt;

&lt;p&gt;&lt;a href="https://github.com/Aatmaj-Zephyr" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Follow me on Github!&lt;/a&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Data structures&lt;/li&gt;
&lt;li&gt;Machine learning&lt;/li&gt;
&lt;li&gt;Math&lt;/li&gt;
&lt;li&gt;Flutter and App dev&lt;/li&gt;
&lt;li&gt;IOT&lt;/li&gt;
&lt;li&gt;University&lt;/li&gt;
&lt;li&gt;Interview prep&lt;/li&gt;
&lt;li&gt;CP&lt;/li&gt;
&lt;li&gt;IOS&lt;/li&gt;
&lt;li&gt;Blockchain&lt;/li&gt;
&lt;li&gt;Cloud computing&lt;/li&gt;
&lt;li&gt;Web dev&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;li&gt;Language resources questions and cheatsheets&lt;/li&gt;
&lt;li&gt;Data base&lt;/li&gt;
&lt;li&gt;cheatsheets&lt;/li&gt;
&lt;li&gt;Awesome github repositories&lt;/li&gt;
&lt;li&gt;git&lt;/li&gt;
&lt;li&gt;Others&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data structures
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/jwasham/coding-interview-university" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Djwasham%26repo%3Dcoding-interview-university" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/codescoop/Play-with-Data-Structures" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dcodescoop%26repo%3DPlay-with-Data-Structures" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kunal-kushwaha/DSA-Bootcamp-Java" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dkunal-kushwaha%26repo%3DDSA-Bootcamp-Java" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/careermonk/data-structures-and-algorithms-made-easy-in-java" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dcareermonk%26repo%3Ddata-structures-and-algorithms-made-easy-in-java" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/technojam/Ultimate_Algorithms_Repository" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dtechnojam%26repo%3DUltimate_Algorithms_Repository" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Nawaz2000/Java-DSA" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DNawaz2000%26repo%3DJava-DSA" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/rupak-20/DSA-concepts" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Drupak-20%26repo%3DDSA-concepts" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/TheAlgorithms/Python" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DTheAlgorithms%26repo%3DPython" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/TheAlgorithms/Java" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DTheAlgorithms%26repo%3DJava" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/trekhleb/javascript-algorithms" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dtrekhleb%26repo%3Djavascript-algorithms" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Machine learning
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/TarrySingh/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DTarrySingh%26repo%3DArtificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/hrnbot/Basic-Mathematics-for-Machine-Learning" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dhrnbot%26repo%3DBasic-Mathematics-for-Machine-Learning" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/giangtranml/ml-from-scratch" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dgiangtranml%26repo%3Dml-from-scratch" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Krish-Mahajan/Pandas-Tutorial" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DKrish-Mahajan%26repo%3DPandas-Tutorial" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Math
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/patrickwalls/mathematicalpython" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dpatrickwalls%26repo%3Dmathematicalpython" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/drvinceknight/Python-Mathematics-Handbook" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Ddrvinceknight%26repo%3DPython-Mathematics-Handbook" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Jam3/math-as-code" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DJam3%26repo%3Dmath-as-code" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/michiganrobotics/rob501" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dmichiganrobotics%26repo%3Drob501" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/TalalAlrawajfeh/mathematics-roadmap" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DTalalAlrawajfeh%26repo%3Dmathematics-roadmap" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/PlamenStilyianov/FinMathematics" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DPlamenStilyianov%26repo%3DFinMathematics" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/rossant/awesome-math" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Drossant%26repo%3Dawesome-math" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/jgoerner/distribution-cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Djgoerner%26repo%3Ddistribution-cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Flutter and App dev
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/vandadnp/flutter-tips-and-tricks" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dvandadnp%26repo%3Dflutter-tips-and-tricks" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Ivo-Balbaert/learning_dart" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DIvo-Balbaert%26repo%3Dlearning_dart" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/iharshb/flutter_ui_collection" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Diharshb%26repo%3Dflutter_ui_collection" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/vamsitallapudi/Android-Interview-Questions-And-Answers" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dvamsitallapudi%26repo%3DAndroid-Interview-Questions-And-Answers" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/balsikandar/Best-Coding-practices-in-android" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dbalsikandar%26repo%3DBest-Coding-practices-in-android" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  IOT
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/microsoft/IoT-For-Beginners" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dmicrosoft%26repo%3DIoT-For-Beginners" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/V33RU/IoTSecurity101" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DV33RU%26repo%3DIoTSecurity101" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  University
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/Aatmaj-Zephyr/Solutions-to-first-year-practicals" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DAatmaj-Zephyr%26repo%3DSolutions-to-first-year-practicals" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Ashish-khanagwal/Open-source-practice-and-resources" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DAshish-khanagwal%26repo%3DOpen-source-practice-and-resources" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Interview prep
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/mission-peace/interview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dmission-peace%26repo%3Dinterview" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Twipped/InterviewThis" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DTwipped%26repo%3DInterviewThis" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/viraptor/reverse-interview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dviraptor%26repo%3Dreverse-interview" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/yangshun/tech-interview-handbook" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dyangshun%26repo%3Dtech-interview-handbook" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Olshansk/interview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DOlshansk%26repo%3Dinterview" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/coding-club-iit-jammu/Coding-Interview-Preparation" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dcoding-club-iit-jammu%26repo%3DCoding-Interview-Preparation" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/riti2409/Resources-for-preparation-Of-Placements" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Driti2409%26repo%3DResources-for-preparation-Of-Placements" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/tsiege/Tech-Interview-Cheat-Sheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dtsiege%26repo%3DTech-Interview-Cheat-Sheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  CP
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/WonderPro/LeetCode" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DWonderPro%26repo%3DLeetCode" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/stephencarrera/toy-problems" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dstephencarrera%26repo%3Dtoy-problems" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/nileshky1/LeetCode-Practice" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dnileshky1%26repo%3DLeetCode-Practice" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/knockcat/Leetcode" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dknockcat%26repo%3DLeetcode" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/rupak-20/Competitive-Programming" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Drupak-20%26repo%3DCompetitive-Programming" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Navaneethp007/MissionImpossible" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DNavaneethp007%26repo%3DMissionImpossible" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  IOS
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/vsouza/awesome-ios" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dvsouza%26repo%3Dawesome-ios" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/ansjdnakjdnajkd/iOS" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dansjdnakjdnajkd%26repo%3DiOS" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Blockchain
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/smartcontractkit/full-blockchain-solidity-course-js" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dsmartcontractkit%26repo%3Dfull-blockchain-solidity-course-js" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/protofire/blockchain-learning-path" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dprotofire%26repo%3Dblockchain-learning-path" alt="Repo name" width="400" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud computing
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/learntocloud/learn-to-cloud" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dlearntocloud%26repo%3Dlearn-to-cloud" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Web dev
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/learning-zone/website-templates" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dlearning-zone%26repo%3Dwebsite-templates" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/ryanthtra/django-rest-api-cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dryanthtra%26repo%3Ddjango-rest-api-cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/wsvincent/awesome-django" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dwsvincent%26repo%3Dawesome-django" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/MoonHighway/learning-react" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DMoonHighway%26repo%3Dlearning-react" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/goldbergyoni/nodejs-course" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dgoldbergyoni%26repo%3Dnodejs-course" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/fullstackreact/30-days-of-react" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dfullstackreact%26repo%3D30-days-of-react" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/SanKlein/JavaScript-30" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DSanKlein%26repo%3DJavaScript-30" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LeCoupa/awesome-bootstrappers" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DLeCoupa%26repo%3Dawesome-bootstrappers" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/jassics/security-study-plan" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Djassics%26repo%3Dsecurity-study-plan" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Languageresources questions and cheatsheets
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/inancgumus/learngo" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dinancgumus%26repo%3Dlearngo" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/PrajaktaSathe/Java" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DPrajaktaSathe%26repo%3DJava" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/ctjhoa/rust-learning" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dctjhoa%26repo%3Drust-learning" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/workshopper/javascripting" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dworkshopper%26repo%3Djavascripting" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/smartherd/KotlinTutorial" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dsmartherd%26repo%3DKotlinTutorial" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/lifeparticle/Ruby-Cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dlifeparticle%26repo%3DRuby-Cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/rmolinamir/typescript-cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Drmolinamir%26repo%3Dtypescript-cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/wilfredinni/python-cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dwilfredinni%26repo%3Dpython-cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/geektutu/7days-golang" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dgeektutu%26repo%3D7days-golang" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/DrkSephy/es6-cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DDrkSephy%26repo%3Des6-cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/tuantvk/python-cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dtuantvk%26repo%3Dpython-cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/SoftUni/Programming-Basics-Book-Java-EN" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DSoftUni%26repo%3DProgramming-Basics-Book-Java-EN" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/TheAlgorithms/C-Plus-Plus" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DTheAlgorithms%26repo%3DC-Plus-Plus" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Aatmaj-Zephyr/Batch-2021" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DAatmaj-Zephyr%26repo%3DBatch-2021" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Aatmaj-Zephyr/Learning-Python" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DAatmaj-Zephyr%26repo%3DLearning-Python" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Aatmaj-Zephyr/MATLAB-MONDAYS" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DAatmaj-Zephyr%26repo%3DMATLAB-MONDAYS" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kjsce-codecell/Advance-Python-Notes" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dkjsce-codecell%26repo%3DAdvance-Python-Notes" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Data base
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/riti2409/DBMS_SQL-Notes" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Driti2409%26repo%3DDBMS_SQL-Notes" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  cheatsheets
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/sematext/cheatsheets" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dsematext%26repo%3Dcheatsheets" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/ruanbekker/cheatsheets" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Druanbekker%26repo%3Dcheatsheets" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/tchapi/markdown-cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dtchapi%26repo%3Dmarkdown-cheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/darkmatter18/cheatsheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Ddarkmatter18%26repo%3Dcheatsheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/LeCoupa/awesome-cheatsheets" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DLeCoupa%26repo%3Dawesome-cheatsheets" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/PushpenderIndia/Java-Cheat-Sheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DPushpenderIndia%26repo%3DJava-Cheat-Sheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/gendx/html-cheat-sheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dgendx%26repo%3Dhtml-cheat-sheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Awesome github repositories
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/0xRitesh/awesome-repositories" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3D0xRitesh%26repo%3Dawesome-repositories" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Thuva4/Useful-Repositories" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DThuva4%26repo%3DUseful-Repositories" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  git
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/EshanTrivedi21/Git-CheatSheet" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DEshanTrivedi21%26repo%3DGit-CheatSheet" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kodekloudhub/git-for-beginners-course" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dkodekloudhub%26repo%3Dgit-for-beginners-course" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Others
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/mmenestret/fp-resources" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dmmenestret%26repo%3Dfp-resources" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kunal-kushwaha/DevOps-Bootcamp" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dkunal-kushwaha%26repo%3DDevOps-Bootcamp" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/SanKlein/practice" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DSanKlein%26repo%3Dpractice" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kamranahmedse/design-patterns-for-humans" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dkamranahmedse%26repo%3Ddesign-patterns-for-humans" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/WonderPro/Books_for_programming" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3DWonderPro%26repo%3DBooks_for_programming" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/kamranahmedse/developer-roadmap" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stats.vercel.app%2Fapi%2Fpin%2F%3Fusername%3Dkamranahmedse%26repo%3Ddeveloper-roadmap" alt="Repo name" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Help grow the community
&lt;/h2&gt;

&lt;p&gt;Know a cool repo? Let us know by opening a &lt;a href="https://github.com/Aatmaj-Zephyr/A-collection-of-useful-repositories/fork" rel="noopener noreferrer"&gt;pull request&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>github</category>
      <category>opensource</category>
      <category>beginners</category>
      <category>resources</category>
    </item>
    <item>
      <title>5 proverbs for rapid development</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Fri, 22 Oct 2021 06:06:40 +0000</pubDate>
      <link>https://dev.to/aatmaj/5-proverbs-for-rapid-development-2o4o</link>
      <guid>https://dev.to/aatmaj/5-proverbs-for-rapid-development-2o4o</guid>
      <description>&lt;h2&gt;
  
  
  Let us see five proverbs which fit perfectly to the rapid development scenario.
&lt;/h2&gt;




&lt;h3&gt;
  
  
  An ounce of protection is worth a pound of cure.
&lt;/h3&gt;

&lt;p&gt;A little precaution before a crisis hits is better than lot of firefighting afterwards.&lt;br&gt;
Many times, developers neglect risk management. Risk management, identification and prevention are more critical than we think. Unidentified risks cause a lot of trouble in the later stages of software development. This is why, preventing such risks is wiser than to fix them after they get worsened. Identifying risks and taking precautions against them, that is protecting the project against the risk is a key to rapid development.&lt;/p&gt;

&lt;h3&gt;
  
  
  A stich in time saves nine
&lt;/h3&gt;

&lt;p&gt;Correction at early stages saves work later.&lt;br&gt;
In a software development lifecycle, doing right things at the right time is very important. If work is delayed in the earlier stages, it can causes much trouble afterward. Example a flaw in the design time is not fixed is bound to cause a disaster. And one flaw in the implementation time if not fixed will take almost triple the time to fix at the debugging phase. &lt;/p&gt;

&lt;h3&gt;
  
  
  Cross the stream where it is shallowest.
&lt;/h3&gt;

&lt;p&gt;Don't complicate things unnecessarily.&lt;br&gt;
Many developers believe that the more complicated things will be made, the better the project will execute. But that's not the case. In reality complicated practices, stringent methodologies actually lengthen the process rather than  making it faster. This is why many times the simple is the best. Complex design patters, complex code leads only to increasing the clutter of the program. Yes, this doesnt mean that one must nor use complex patterns or code. This means that one must always strive for a simpler solution to the problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Watch the doughnut, and not the hole.
&lt;/h3&gt;

&lt;p&gt;Focus on what you have rather than at what you don't.&lt;br&gt;
In a software development lifecycle, one cannot get all the aspects perfect. In that case, you need to maximize what you have over what you don't. For example you might not have trained personnel, or say might not have enough time. But in such cases, you must focus on what you have and try to give the best possible. Focus on your strengths and try to win the match.&lt;/p&gt;

&lt;h3&gt;
  
  
  Too many cooks spoil the broth.
&lt;/h3&gt;

&lt;p&gt;If too many people are involved in a task or activity, it will not be done well.&lt;br&gt;
This is often the case with software development scenarios. Too many people who are experienced and have their own different viewpoints. While difference in perspectives always leads to better ideas, there must be only one decision maker whome everyone  must follow. Disagree but commit must be the case with those who are the subordinates. If too many people are decision makers, then it will lead to chaos.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Waterfall with subprojects</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Thu, 21 Oct 2021 11:38:13 +0000</pubDate>
      <link>https://dev.to/aatmaj/waterfall-with-subprojects-53a9</link>
      <guid>https://dev.to/aatmaj/waterfall-with-subprojects-53a9</guid>
      <description>&lt;p&gt;One most significant problems with the pure waterfall model from a rapid development point of view are that you're supposed to be completely done with an architectural design before you begin with a detailed design, and you're supposed to be completely done with the detailed design before you begin coding and debugging. However, in the practical world, systems do have areas that contain design surprises, but they have other areas that we have implemented many times before and contain no surprises. Delaying the implementation of the areas that are easy to design just because the design of a difficult area is pending is not a good idea. If the architecture has broken the system into a logically independent system, you can spin off separate projects, each of which can proceed at its own pace.&lt;/p&gt;

&lt;p&gt;This is what is called as the waterfall with sub-projects model. In this model, the waterfall is broken into different parts and the subprojects are executed independently into waterfall streams.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fll9atwu3d5fhakhe31wy.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fll9atwu3d5fhakhe31wy.jpeg" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The main risk
&lt;/h2&gt;

&lt;p&gt;This model a very vulnerable risk, that is unforeseen interdependencies. You can partly account for that by removing dependencies at the architecture time or waiting until&lt;br&gt;
detailed design time to break the project into subprojects.&lt;br&gt;
Careful planning can allow you to perform some of the waterfall's task in parallel.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Notes and images from &lt;a href="https://www.amazon.com/Rapid-Development-Taming-Software-Schedules/dp/1556159005" rel="noopener noreferrer"&gt;Rapid Development: Taming Wild Software Schedules by Steve McConnell&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>Sashimi Waterfall model of development</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Thu, 21 Oct 2021 11:36:57 +0000</pubDate>
      <link>https://dev.to/aatmaj/sashimi-waterfall-model-of-development-574o</link>
      <guid>https://dev.to/aatmaj/sashimi-waterfall-model-of-development-574o</guid>
      <description>&lt;h3&gt;
  
  
  Sashimi Waterfall model of development
&lt;/h3&gt;

&lt;p&gt;The name Sashimi comes from the Japanese style of presenting raw fish, where the slices overlap each other. In the sashimi model, too the stages overlap each other to overcome the drawbacks of the traditional waterfall development model.&lt;br&gt;
The sashimi model of development is a modification to the traditional waterfall model. &lt;br&gt;
The traditional waterfall provides minimal overlapping between the two stages of development. But that s not the case with the Sashimi model of development.&lt;br&gt;
This model suggests a stronger degree of overlap between the stages-For example, suggesting you might be well into architectural design partway between the structural analysis and perhaps partway into the detailed designing before you consider requirements analysis to ve complete. This is a reasonable approach for many projects, which tend t gain important insights into what they are doing as they move through their development cycles and which function poorly with their strictly sequential development plans. In the pure waterfall model, the ideal documentation is that one team can to a completely separate team between any two phases. The question is, "why?" If you can provide personnel continuity between all stages of software development, you don't need much documentation. This wa, by following modified waterfall model, you can substantially reduce the need for documentation.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4xr66g08o0x5al2b5vbz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4xr66g08o0x5al2b5vbz.jpeg" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  The disadvantages.
&lt;/h1&gt;

&lt;p&gt;The Sashimi model is no without problems. Because there is an overlap between the phases, milestones are more ambiguous, and it's harder to track progress accurately. Performing activities in parallel can lead to miscommunication, mistaken assumptions and result in inefficiency. If you are working on a small, well-defined project, something close to the pure waterfall can be more efficient instead.&lt;/p&gt;



&lt;p&gt;&lt;em&gt;Notes and images from &lt;a href="https://www.amazon.com/Rapid-Development-Taming-Software-Schedules/dp/1556159005" rel="noopener noreferrer"&gt;Rapid Development: Taming Wild Software Schedules by Steve McConnell&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;If you liked the post, please like it and follow me on Github!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Aatmaj-Zephyr" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Follow me on Github!&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>Learning Python Intermediate Course- yearning for suggestions</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Tue, 19 Oct 2021 15:46:10 +0000</pubDate>
      <link>https://dev.to/aatmaj/learning-python-intermediate-course-yearning-for-suggestions-3kb</link>
      <guid>https://dev.to/aatmaj/learning-python-intermediate-course-yearning-for-suggestions-3kb</guid>
      <description>&lt;p&gt;The intermediate part of the Learning Python course ended last week.&lt;br&gt;
In case you missed it, you might check out the series &lt;a href="https://dev.to/aatmaj/series/13315"&gt;here&lt;/a&gt;. So I am asking you all for any suggestions you might want to add to help me improve.&lt;/p&gt;




&lt;p&gt;So guys if anyone of you have any suggestions of doubts or anything to add, please comment them below. 😊&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>learningpython</category>
    </item>
    <item>
      <title>Spiral lifecycle model Part 2</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Mon, 18 Oct 2021 07:54:22 +0000</pubDate>
      <link>https://dev.to/aatmaj/spiral-lifecycle-model-part-2-1ci9</link>
      <guid>https://dev.to/aatmaj/spiral-lifecycle-model-part-2-1ci9</guid>
      <description>&lt;p&gt;&lt;strong&gt;In the last post, we studied about the spiral lifecycle model. Let us now continue discussing about the model in this part. Just in case you missed it, you can check it out &lt;a href="https://dev.to/aatmaj/spiral-lifecycle-model-part-1-4cjh"&gt;here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Advantages of the model
&lt;/h3&gt;

&lt;p&gt;The spiral lifecycle model helps you analyze risks and eliminate them before they get too big. One of the moist important advantages of the spiral model is that as the cost increases, the risk decreases. The more time and money you spend, the lesser risk you are actually taking, which is exactly what we all want in any lifecycle model.&lt;/p&gt;

&lt;p&gt;The spiral model provides at least as much management control as the traditional waterfall model, you have the checkpoints ready just from the start of every iteration. Because the model is risk oriented, it provides you with the early indications of any risks possible. If in the worst case, the project cant be done for technical or any other reasons, you will find that out early on. Moreover the users can see the system easily from the start due to &lt;strong&gt;effective prototyping&lt;/strong&gt;. This results in &lt;strong&gt;Early user engagement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The spiral lifecycle model can be coupled with other lifecycle models in a couple of different ways. This is why this model is very adaptable. And yes, the transition from building a project to maintaining it is so smooth that this boosts the overall maintainability of the project &lt;/p&gt;

&lt;h3&gt;
  
  
  Disadvantages
&lt;/h3&gt;

&lt;p&gt;The only disadvantage of the spiral model is that it's a lot complicated.  It requires conscientious, attentive and knowledgeable management. It can be difficult to define objective, verifiable milestones that indicate weather you're ready to add the next layer to the model or not. In some cases, the product development is straight forward enough and project risks are modest enough that you don't need the flexibility and risk management provided by the spiral model. Not suitable for small or low risk projects and could be expensive for small projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  When to use this model
&lt;/h3&gt;

&lt;p&gt;Use this model when you have an experienced management staff. Use in projects where user involvement is to be preferred over expected time to complete.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use For&lt;/p&gt;
&lt;h5&gt;
  
  
  For medium to high-risk projects.
&lt;/h5&gt;
&lt;h5&gt;
  
  
  When there is adequate to fair time.
&lt;/h5&gt;
&lt;/blockquote&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Learning Python- Intermediate course: Day 44, Summary of the week, examples and exercises</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Sat, 16 Oct 2021 06:05:44 +0000</pubDate>
      <link>https://dev.to/aatmaj/learning-python-intermediate-course-day-44-summary-of-the-week-examples-and-exercises-3lfg</link>
      <guid>https://dev.to/aatmaj/learning-python-intermediate-course-day-44-summary-of-the-week-examples-and-exercises-3lfg</guid>
      <description>&lt;h2&gt;
  
  
  Today we will have a quick summary of the week
&lt;/h2&gt;




&lt;p&gt;Let us see a sample OOP program&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;animal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
 &lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;makenoise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;pet&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;bepetted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pet me&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;canine&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;shownails&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;My nails are long&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;dog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pet&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a dog&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bone&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;makenoise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Woof!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;canine&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;milk&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a cat&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;makenoise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;meow!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Tommy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;dog&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;Tommy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;makenoise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;Tommy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bepetted&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Tommy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;Dina&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;Dina&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shownails&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;Dina&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bepetted&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Dina&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I am a dog
Woof!
Pet me
bone
I am a cat
My nails are long
Pet me
milk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Exercises-
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1) Correct the following code
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;yo!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traceback (most recent call last):
  File "main.py", line 6, in &amp;lt;module&amp;gt;
    sample.fun()
TypeError: fun() missing 1 required positional argument: 'self'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2) Correct the following code
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
  &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;yo!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traceback (most recent call last):
  File "main.py", line 6, in &amp;lt;module&amp;gt;
    mysample.fun()
TypeError: fun() takes 0 positional arguments but 1 was given
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3) Extend the above program to include a class tiger and class wild. Add attribute habitat to wild and pet. Use iterable for in loop to call out the methods (hint use try except)
&lt;/h4&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://dev.to/aatmaj/learning-python-intermediate-course-day-41-inheritance-in-python-53la"&gt;Day 41&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;We learnt about inheritance in Python&lt;br&gt;
 Inheritance is an OOP concept which provides flexibility and code reusability to the program. We can make changes to the program without altering much code. We can also extend the code by adding new functionality without much effort. Inheritance in Python is achieved by adding the name of the super classes inside the constructor of the new class. In this part we studied how functions and properties are inherited from the super class. But object constructors are not inherited by the subclasses, however the number of arguments for constructors must be the same for both if the classes. Functions are overloaded in the subclasses, that is the functions with same name can be present in both the subclass and the super class. In such cases, the functions of the sub-class are considered as effective. Constructors and methods of the superclass can be called by the &lt;code&gt;super()&lt;/code&gt; method in case of overloading.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://dev.to/aatmaj/learning-python-intermediate-course-day-42-polymorphism-a61"&gt;Day 42&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In this part we learnt about polymorphism, yet another OOP feature. Just like inheritance, polymorphism too does help in making the program more extendable and flexible. Using polymorphism, we can create new subclasses without doing much change into the superclass. Polymorphism is a technique by which subclasses can be considered as types of super-classes. Polymorphism in Python is achieved through overwriting of methods.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://dev.to/aatmaj/learning-python-intermediate-course-day-43-ddd-and-more-on-oop-2npf"&gt;Day 43&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In this part we covered some more of OOP. We covered concepts which are not directly supported by Python, like abstraction and interfaces. We saw a brief about duck typing and how to resolve the Deadly Diamond of Death. This part was just intended to bring together a feeling of completeness regarding OOP concepts and not a complete guide towards OOP.&lt;/p&gt;




&lt;h2&gt;
  
  
  Intermediate part of the course ends today.
&lt;/h2&gt;




&lt;p&gt;So friends, this marks the end of the Learning Python intermediate course. I will be soon providing you all with the summary of the intermediate course.&lt;/p&gt;

</description>
      <category>learningpython</category>
      <category>python</category>
      <category>oop</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learning Python- Intermediate course: Day 43, DDD and more on OOP</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Thu, 14 Oct 2021 11:12:16 +0000</pubDate>
      <link>https://dev.to/aatmaj/learning-python-intermediate-course-day-43-ddd-and-more-on-oop-2npf</link>
      <guid>https://dev.to/aatmaj/learning-python-intermediate-course-day-43-ddd-and-more-on-oop-2npf</guid>
      <description>&lt;h2&gt;
  
  
  Today we will cover some OOP properties that are not covered in Python and look at how Python resolves the Deadly Diamond of Death.
&lt;/h2&gt;




&lt;p&gt;Python is a language mainly designed to use for data oriented analysis. Today, the most popular use of Python is Data science and ML. Although Python is used as a full-stack to some extent, heavy backending applications which require OOP are still made in Java to a certain extent. &lt;/p&gt;

&lt;p&gt;Java is OOP. It is the best suited for design patterns and other beautiful OOP stuff. Python is suited for Data science.. This is why probably Python doesn't support a few features of OOP which are critical to design patterns. Two most significant features are &lt;strong&gt;Abstract classes&lt;/strong&gt; and &lt;strong&gt;interfaces&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although these features may not be available in core Python, we can still use them with the aid of a module know as &lt;code&gt;abc&lt;/code&gt; But that is not for this course.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclaimer! Advanced concepts like Multiple inheritance, duck typing, abc module will be covered in the advanced part of this course. This part is only for a brief upon those concepts.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Interfaces
&lt;/h3&gt;

&lt;p&gt;Why do we even need interfaces when Python supports multiple inheritance? An interface is the Java workaround for multiple inheritance. All features of interfaces are covered by two python aspects- multiple inheritance and duck typing. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Still, a few use cases of interfaces are not resolved fully. If you want to make base classes that cannot be instantiated, but provide a specific interface or part of an implementation, interfaces are a must. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Duck typing in Python
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;"If it walks like duck, swims like duck, looks like a duck, then it probably should be a duck."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In other words, of a class has methods, properties of another class, it is another class. This simply means types go for a toss in Python as long as methods and attributes are the same.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I know you have not understood anything.... this will be covered in detail in the advanced part of this course.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Multiple inheritance in Python
&lt;/h4&gt;

&lt;p&gt;Python supports multiple inheritance. This means that one class can inherit two or more classes. The method resolution is done clearly in Python, unlike C++ and helps resolve most of the issues&lt;br&gt;
More about it in the advanced part of this course&lt;/p&gt;
&lt;h4&gt;
  
  
  Deadly Diamond of Death
&lt;/h4&gt;

&lt;p&gt;Python has a simple way of handling the diamond problem. The method of the first superclass passed is called.&lt;/p&gt;

&lt;p&gt;Let us continue with yesterday's program&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;pass&lt;/span&gt; &lt;span class="c1"&gt;# Do nothing
&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bananas&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a chimp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fruits&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a gorrilla&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;gorranzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;gorranzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bananas
I am a chimp

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;pass&lt;/span&gt; &lt;span class="c1"&gt;# Do nothing
&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bananas&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a chimp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fruits&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a gorrilla&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;gorranzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;gorranzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fruits
I am a gorrilla

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If gorilla is passed first, then the &lt;code&gt;cry()&lt;/code&gt; method and constructor of gorilla class will run. And if chimpanzee is passed first, then the cry and constructor of chimpanzee class will be run.&lt;/p&gt;

&lt;h4&gt;
  
  
  Abstract classes
&lt;/h4&gt;

&lt;p&gt;In the above example, ape was the class which needn't be instantiated, and could have been made an abstract class. But Python doesn't support abstract classes in an built way. However, modules can be used to implement abstractions.&lt;/p&gt;

&lt;h3&gt;
  
  
  abc module
&lt;/h3&gt;

&lt;p&gt;The abc (Abstract Base Classes) is a inbuilt Python module which enables the usage of abstract classes and inheritance in Python.&lt;br&gt;
This module provides the metaclass ABCMeta for defining ABCs and a helper class ABC to alternatively define ABCs through inheritance.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The package zope.interface provides an implementation of “object interfaces” for Python. It is maintained by the Zope Toolkit project. The package exports two objects, ‘Interface’ and ‘Attribute’ directly. It also exports several helper methods. It aims to provide stricter semantics and better error messages than Python’s built-in abc module.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://twistedmatrix.com/documents/current/core/howto/plugin.html" rel="noopener noreferrer"&gt;The Twisted Plugin System&lt;/a&gt; is an alternative to the zope interface.&lt;/p&gt;




&lt;p&gt;And at last, before ending today's last session, some philosophical sermon&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Python follows the EAFP (Easier to Ask Forgiveness than Permission) rather than the LBLY (Look Before You Leap) philosophy. The EAFP is somewhat linked to the "duck typing" style.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>learningpython</category>
      <category>python</category>
      <category>programming</category>
      <category>oop</category>
    </item>
    <item>
      <title>Learning Python- Intermediate course: Day 42, Polymorphism.</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Wed, 13 Oct 2021 14:32:32 +0000</pubDate>
      <link>https://dev.to/aatmaj/learning-python-intermediate-course-day-42-polymorphism-a61</link>
      <guid>https://dev.to/aatmaj/learning-python-intermediate-course-day-42-polymorphism-a61</guid>
      <description>&lt;h2&gt;
  
  
  Today we will learn about Polymorphism in Python
&lt;/h2&gt;




&lt;h3&gt;
  
  
  What exactly is Polymorphism
&lt;/h3&gt;

&lt;p&gt;Polymorphism is an OOP feature which provides extensibility and flexibility to your code. The major advantage of Polymorphism is flexibility. Polymorphism gives you the the flexibility lost in inheritance. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Poly&lt;/strong&gt; - many &lt;br&gt;
&lt;strong&gt;morphism&lt;/strong&gt; -many forms&lt;br&gt;
&lt;strong&gt;Polymorphism&lt;/strong&gt; is the condition of occurrence in different forms.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Polymorphism in operators
&lt;/h4&gt;

&lt;p&gt;We use polymorphism when dealing with operators. For example the &lt;code&gt;+&lt;/code&gt; operator is used to add two numbers as well as to coconcate two strings. In the same way, the product operator &lt;code&gt;*&lt;/code&gt; is used to multiply two integers, floating numbers as well as two complex numbers in Python. This is an example of polymorphism which we have unknowingly used until now.&lt;/p&gt;

&lt;h4&gt;
  
  
  Polymorphism in functions
&lt;/h4&gt;

&lt;p&gt;Till now we have come across many functions which take in arguments of various multiple types. For example the print function takes in lists, tuples, numbers, complex numbers as well as strings. Another example is the &lt;code&gt;len()&lt;/code&gt; function which takes in any iterable type. when string is passed, it returns the number of characters, when list is passed it returns the number of elements and when a dictionary is passed, it returns the number of key values.&lt;/p&gt;




&lt;h3&gt;
  
  
  Polymorphism in OOP
&lt;/h3&gt;

&lt;p&gt;Let us now study what is polymorphism in classes and how does it turn out to be useful.&lt;br&gt;
Yesterday we saw how the methods with same name are overridden. Polymorphism is something related to functions with the same name. In order to understand what polymorphism is, let us consider the following example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;pass&lt;/span&gt; &lt;span class="c1"&gt;# Do nothing
&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bananas&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a chimp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fruits&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a gorrilla&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I am a chimp
I am a chimp
I am a gorrilla
20
25
50
bananas
bananas
fruits

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Study the above example carefully.  What we have seen above is an example of polymorphism itself!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, chimpanzee and gorilla both derive from the same class- ape. They have same attributes- weight and food. But they have different values for them. We can even add additional  methods for each of those classes. But the attributes weight, food, and method eat was derived from the class ape itself. So is there a way to use them without knowing weather the ape is a chimpanzee or a gorilla? This is possible if all of them have same methods (that is overloaded methods.) In other words can we just use their 'apish' characteristics as one by using the methods. This is the central idea behind polymorphism. In Python, Polymorphism is achieved through method overloading.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;a&lt;/code&gt; is both a ape as well as a chimpanzee. So can we treat a as n ape? so can we treat &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt; as equal apes? We can using polymorphism. At times, we may need to consider that &lt;code&gt;a,b,c&lt;/code&gt; are just apes and not gorillas or chimpanzees and treat them all equally. This decreases the overhead of treating objects of different subclasses species as different entities. For example tomorrow if I want to add an Orangutan subclass, I will not require to go back and change everything I had written earlier. Using Polymorphism I can just treat them as equals. We overload the functions.&lt;/p&gt;

&lt;p&gt;Now we can make the polymorphism better by using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;pass&lt;/span&gt; &lt;span class="c1"&gt;# Do nothing
&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bananas&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a chimp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ape&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fruits&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I am a gorrilla&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;chimpanzee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;gorrilla&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
 &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cry&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
 &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;eat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;So friends that was all for today. Let us learn more about Python in the upcoming days.....&lt;/p&gt;

</description>
      <category>learningpython</category>
      <category>python</category>
      <category>tutorial</category>
      <category>oop</category>
    </item>
    <item>
      <title>Learning Python- Intermediate course: Day 41, Inheritance in Python</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Wed, 13 Oct 2021 04:58:05 +0000</pubDate>
      <link>https://dev.to/aatmaj/learning-python-intermediate-course-day-41-inheritance-in-python-53la</link>
      <guid>https://dev.to/aatmaj/learning-python-intermediate-course-day-41-inheritance-in-python-53la</guid>
      <description>&lt;h2&gt;
  
  
  Today we will learn about inheritance in Python
&lt;/h2&gt;




&lt;h3&gt;
  
  
  Inheritance
&lt;/h3&gt;

&lt;p&gt;Inheritance provides &lt;strong&gt;Code Reusability&lt;/strong&gt;. We do not need to write the same piece of code again and again for various subclasses. This increases &lt;strong&gt;Flexibility&lt;/strong&gt; of the code. This means that subclasses can be formed without altering the original classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The inherited class can use functions and variables of the derived class&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Syntax.
&lt;/h3&gt;

&lt;p&gt;Classes can be inherited by passing the name of the superclass to the brackets &lt;code&gt;class inherited(master)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let us see an example below to demonstrate inheritance in pyuthon&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello world
5

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Explaination
&lt;/h4&gt;

&lt;p&gt;Here, sample() is the masterclass and sasmple2 is the derived class. The derived class sample2 inherits the master class as we pas the  name of the master class into the derived class bracket.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;class sample2():&lt;/code&gt; This syntax will create class &lt;code&gt;sample2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;class sample2(sample)&lt;/code&gt;: This syntax will create a class &lt;code&gt;sample2&lt;/code&gt; and make it inherit the class &lt;code&gt;sample&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the class &lt;code&gt;sample2&lt;/code&gt; inherits &lt;code&gt;sample&lt;/code&gt;, it can use it's attributes (like here a and b) in it's body. This is why no errors were generated when we used to variables a and b directly in the function &lt;code&gt;fun2&lt;/code&gt;. The values fir a and b were assigned in  the master class (&lt;code&gt;sample2&lt;/code&gt; itself ands need not be assigned again . This is an example of &lt;strong&gt;code reuse&lt;/strong&gt; and &lt;strong&gt;information hiding&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The derived class &lt;code&gt;sample2&lt;/code&gt; can also use the functions declared in the master class. This is how the function &lt;code&gt;fun&lt;/code&gt; could be used  and run successfully.&lt;/p&gt;

&lt;p&gt;I hope you do not have any more doubts, if you have, please feel free to post them in the comments below.&lt;/p&gt;




&lt;h3&gt;
  
  
  Inheritance of constructors.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Constructors are not inherited by default.&lt;/strong&gt; The example below will make things very clear&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello world
5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, you would expect the output to be 150 and not 5. But it is not so. This is because of the fact the constructors of the master class are not inherited by the derived classes by default. This means that &lt;code&gt;sample2.__init__&lt;/code&gt; is not the same as &lt;code&gt;sample.__init__&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Why? Well remember In the previous parts we learnt that if we do not provide a constructor to the class, Python provides one default constructor automatically? Something similar happened in this case. We did not provide any constructor to the &lt;code&gt;sample2&lt;/code&gt; class. So python made a default blank constructor in it's place, which had no relation to the master class. &lt;/p&gt;

&lt;p&gt;If we want to add the constructor, we can use the following syntax-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the super keyword, we can manage the constructors.&lt;/p&gt;

&lt;p&gt;Note, even though constructors are not inherited, the arguments of the constructors in both the classes must match. Example shown below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traceback (most recent call last):
  File "main.py", line 14, in &amp;lt;module&amp;gt;
    mysample2=sample2()
TypeError: __init__() missing 1 required positional argument: 'var'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello world
150

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Exercise&lt;/strong&gt; What is the output of the following program? and why?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solution-&lt;br&gt;
The output is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello world
5

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is because &lt;code&gt;self.a=100&lt;/code&gt; and &lt;code&gt;self.b=200&lt;/code&gt; should haver been written in place of &lt;code&gt;a=100&lt;/code&gt; and &lt;code&gt;b=200&lt;/code&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Function overloading in Python
&lt;/h4&gt;

&lt;p&gt;What if two functions have the same name in the master class as well as the derived class? Well the answer is simple the function in the derived class will be considered. &lt;br&gt;
This is know as function overloading.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;150
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we want to use the function in the previous function, then use the super syntax again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
 &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
 &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;
     &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;
 &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
     &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;sample2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;mysample2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fun&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello world
150
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;So friends that was all for today. Thank you and hope you are enjoying....&lt;/p&gt;

</description>
      <category>learningpython</category>
      <category>python</category>
      <category>oop</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Spiral lifecycle model Part 1</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Mon, 11 Oct 2021 12:39:34 +0000</pubDate>
      <link>https://dev.to/aatmaj/spiral-lifecycle-model-part-1-4cjh</link>
      <guid>https://dev.to/aatmaj/spiral-lifecycle-model-part-1-4cjh</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The spiral model of development is a really good model that helps you develop faster. In the spiral model, you start small and expand the scope of the project in increments. You expand the scope only after you have reduced the risks for the next increment to an acceptable level. Today let us learn more about this model&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;The spiral model is a risk oriented model that breaks a software project up into mini projects. Each mini-project addresses one or more major risks until al the major risks have been addressed. &lt;br&gt;
Risks refers to factors like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Poorly understood requirements&lt;/li&gt;
&lt;li&gt;Poorly understood architecture&lt;/li&gt;
&lt;li&gt;Potential requirement problems&lt;/li&gt;
&lt;li&gt;Problems in underlying technology.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After all the risks have been addressed, the waterfall model terminates as a waterfall lifecycle would.&lt;/p&gt;

&lt;p&gt;The spiral model is also called as the 'cinnamon roll' model.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp504di87sbh4wv9k8yzu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp504di87sbh4wv9k8yzu.jpeg" alt="Cinnamon roll" width="800" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the basic idea about the diagram is that you start on a small scale in the middle of the spine, explore the risks make a plan to handle the risks, and then commit to an approach for the next iteration.&lt;/p&gt;

&lt;p&gt;Each iteration moves the project into a larger scale. You roll up one layer of the cinnamon roll, check to be sure that it's what's  you wanted., and then you begin work for the next layer.&lt;/p&gt;

&lt;p&gt;Each iteration involves the six steps below&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Determine objectives, alternatives, and constraints. &lt;/li&gt;
&lt;li&gt;identify and resolve risks&lt;/li&gt;
&lt;li&gt;Evaluate alternatives&lt;/li&gt;
&lt;li&gt;Plan the next iteration. &lt;/li&gt;
&lt;li&gt;Commit to an approach for the next iteration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the spiral model, the early decisions are the cheapest. You spend less developing the concept of operation  than you do developing the requirements than you do developing the design, implementing the product, and testing it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can tailor the iterations of the model as per your requirements and the needs of the project.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Notes and images from &lt;a href="https://www.amazon.com/Rapid-Development-Taming-Software-Schedules/dp/1556159005" rel="noopener noreferrer"&gt;Rapid Development: Taming Wild Software Schedules by Steve McConnell&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;To be continued...&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learning Python- Intermediate course: Day 40, Summary of the week and more about OOP</title>
      <dc:creator>Aatmaj</dc:creator>
      <pubDate>Sat, 09 Oct 2021 04:31:10 +0000</pubDate>
      <link>https://dev.to/aatmaj/learning-python-intermediate-course-day-40-summary-of-the-week-and-more-about-oop-5gap</link>
      <guid>https://dev.to/aatmaj/learning-python-intermediate-course-day-40-summary-of-the-week-and-more-about-oop-5gap</guid>
      <description>&lt;h2&gt;
  
  
  Today let us summarize the week and check out a more about OOP
&lt;/h2&gt;




&lt;p&gt;Let us first check out a program which shows the implementation of Complex numbers through classes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Complex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;#Default values
&lt;/span&gt;    &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; 

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;Complex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;Complex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3.605551275463989
6.4031242374328485

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program, a and b are different objects of the same class. Which means that they have different values of attributes. Object is representative of class. Consider it like this - class is a common noun while the object is a proper noun. Classes are like templated for molding objects.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why OOP?&lt;/strong&gt; &lt;br&gt;
In software development lifecycle, coding is fifth or sixth stage. First analysis of requirements of clients is done. Developers approach client and get technical review of the requirement, discuss at length with client. Unless we get clarity as what and how is expected coding doesnt start. Then feasibility test is done. budget-wise. then prototype is given to client step by step. Changes are noted. &lt;br&gt;
In this whole process, the use of OOP is beneficial. Maintaining, updating and carry forward existing versions to next version can be done easily using OOP. Code flexibility is enhanced. We can make changes to the project without much changes in code using OOP. Also, extension of code becomes very easy. We can add new features without much changes to the old ones. This is why in a popular language like Python, learning about OOP is important.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Summary of the week.
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://dev.to/aatmaj/learning-python-intermediate-course-day-37-file-handling-in-python-1pih"&gt;Day 37&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;We learnt about file handling in Python. &lt;br&gt;
We can open a file into four modes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"r" Reading mode&lt;/li&gt;
&lt;li&gt;"w" Writing mode&lt;/li&gt;
&lt;li&gt;"a" Appending mode&lt;/li&gt;
&lt;li&gt;"r+" Both reading and writing
If not passed, then Python will assume it to be “ r ” by default. &lt;code&gt;file = open("myfile.txt", "r")&lt;/code&gt; Opens the file. We can read the contents of the file using the &lt;code&gt;file.read()&lt;/code&gt; method. We can write into a file using the &lt;code&gt;file.write("\n")&lt;/code&gt; method. &lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  &lt;a href="https://dev.to/aatmaj/learning-python-intermediate-course-day-38-oop-197"&gt;Day 38&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;We learnt about making classes in Python. Classes are object blueprints. Classes are generated using the syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def functionname (classname,......arguments......):
 ...
 ...
 ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the class methods, the class parameter (&lt;code&gt;self&lt;/code&gt;) is a must. Private methods can be made by writing two underscores before the class name. Private methods cannot be accessed from outside the class.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://dev.to/aatmaj/learning-python-intermediate-course-day-38-oop-constructor-init-2lhj"&gt;Day 39&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Constructors in Python can be created using the &lt;code&gt;__init__&lt;/code&gt; keyword. A constructor is a special type of member function of a class which initializes objects of a class. The constructor is run when the class is instantiated. The class constructors can be called by other parts of the class or even outside pf the class. If we do not provide a constructor to the class, Python generates one default constructor automatically. We can even pass parameters to the constructors.&lt;/p&gt;




&lt;p&gt;So friends that was all for today! &lt;br&gt;
Next week plan-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inheritance&lt;/li&gt;
&lt;li&gt;Polymorphism&lt;/li&gt;
&lt;li&gt;Deadly Diamond of death&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>learningpython</category>
      <category>python</category>
      <category>oop</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
