Saturday, 22 June 2019

Introduction to Python Programming

       
       
        Python is a high level programming language which was created by Dutch programmer named Guido van Rossum in 1990.



Features of Python :
  • Easy to Read & Code : 
    • Any program (instructions/statements that performs a specific task.) having proper indentation is easy to read.
    • In a programming language like c, c++ we use curly braces for grouping statements. Python doesn't use brackets for grouping of statements. In Python "Indentation" shows where the group of statement starts and where it ends.
    • Python uses English keywords thats why its easy to code in Python. By just reading statements we can tell what it does. 
  • Open Source :
    • Open source programming language refers to programming language whose source code is freely available on the internet and we can redistribute and modify it.
    • Because of this feature we can use python for our commercial use.
  •  Object Oriented Programming:
    • Python supports Object Oriented Programming (OOP) paradigm.
    • OOP has more advantages (advantages of Encapsulation, Inheritance, Polymorphism etc.) than procedural programming.
    • For the real world problem OOP is more suitable than any other programming paradigm.
  • Large amount of Standard Libraries : 
    • In programming, library is a collection of functions (Function is a block of code which performs specific task.) that allows you to perform various task effortlessly.
    • In Software or Web development libraries savesmuch more time hence also reduces cost of project.
    • numpy, scipy, pillow, pandas are some of Python's popular libraries.
Python is used in -
  • Web and Internet Development
  • Database Access
  • Desktop GUIs
  • Scientific & Numeric computing
  • Education
  • Network Programming
  • Software & Game Development

Wednesday, 5 June 2019

What is programming language and algorithms.



Programming Language : 
        We use native languages like English, Marathi, Hindi etc. to communicate ๐Ÿ—ฃ with each other. but how we can communicate with computer ? ๐Ÿค”  How we can accomplish our work from computer ? ๐Ÿค”
   
        Computer ๐Ÿ’ป is just a mechanical device and has no intelligence like human have. It works accordingly to the algorithm provided by computer programmer. ๐Ÿค“

        As we understand native languages; computer understands programming languages. There are many programming languages and the popular among them are C, C++, Java, Python etc.

        Programming language consists of set of instructions; ๐Ÿ“ with these instructions computer program produces output.
         Programming languages are mainly classified into two types, low level languages and high level languages.

Low level languages :
        Did you ever think why we use decimal number system in our daily life? ๐Ÿค” It's because we all have 10 fingers. ๐Ÿ˜Š Our ancestors used fingers for counting and calculating. so it's natural to adopt this number system in our daily life.
        In a same way computer have transistors with two states (ON or OFF). Computer is made up of electronic circuits and those circuits can do nothing more than passing electricity. ๐Ÿ˜ฎ This electricity have two states ON and OFF (presence and absence of electricity). These two states are represented by 0 and 1 and known as binary language or machine language of computer.
        Machine code (stream of 0's and 1's) is directly implemented on CPU (Central Processing Unit). that's why time taken by machine code to execute is very small as compared to other languages; but machine code is difficult to understand and write. ๐Ÿ˜ง
        Assembly language is also type of low level language in which programmers work only with operations. Assembly language have set of commands like ADD, MOV etc. Assembly language is still useful when speed is necessary or when we need to carry out an operation which is not possible in high level languages.

High level languages :
        Do you ever think why we invent things ? ๐Ÿค” We invent because we want to make things easier. for example we invented bicycle ๐Ÿšฒ or bike ๐Ÿ because we want to go faster from one destination to another than walking ๐Ÿšถor running ๐Ÿƒ‍. but we didn't stop there we again invented car ๐Ÿš— because we wanted more comfort while travelling. So making thing easier is in the nature of the human being. In a same way we developed high-level programming languages for the ease of writing programs.
        High level programming language is generally written using English keywords and that's why it's easy to understand and write. High-level languages takes more time ๐Ÿ•ฐ to produce output than low level languages because high level languages need to be converted into low level languages using compiler or interpreter. (I will make a separate post on compiler and interpreter)



Algorithm :  
        An algorithm is a set of instructions designed to perform specific task.
        In our daily life we also use algorithms to do specific task to get desired output. You may know how to make a tea, ☕ for making a tea we use following algorithm :


  • Step 1 : Turn on burner. ๐Ÿ”ฅ
  • Step 2 : Take a pan and add water, tea leaves and sugar to it. 
  • Step 3 : Heat the tea until it turns a reddish brown colour. ♨
  • Step 4 : Add milk to the mixture. ๐Ÿผ
  • Step 5 : Stop the burner when the milk rises to the top of the pan.
  • Step 6 : Filter all the solid out (tea leaves).
  • Step 7 : Serve Kadakk chai (hot tea). ☕๐Ÿ˜‹

In a same way we can have algorithm (step-by-step procedure) to perform addition of two numbers given by user :

  • Step 1 : Start
  • Step 2 : read two numbers.
  • Step 3 : Perform addition of numbers given by user.
  • Step 4 : Display addition.
  • Step 5 : Stop.
Next post will be on "Introduction to Python" ๐Ÿค—


Click here ๐Ÿ‘ˆ to add yourself to the Google group so you don't miss any updates.

Saturday, 1 June 2019

First post on programming book which I am going to write ๐Ÿ˜Š

   
    The thought that I must write a book on programming excited ๐Ÿค— me all the time.
   
    Knowledge ๐Ÿ“– has no value unless you use and share it, so I decided to share my little knowledge about computer programming with you.

 

    I will write this book in series of posts which I will post regularly on my blog.

below is the form where you can give me your email so when new post comes you will get notified by e-mail immediately.

https://docs.google.com/forms/d/e/1FAIpQLSfNyZzqW0HfLCeGMJ5a_XZzsS_TbqWXAaWgGPup6NShzY9nsQ/viewform

Thanks for clicking ๐Ÿ™ I will catch you in next post ๐Ÿ™‹