What is Language ?
Language a medium of communication.
What is a programming language ?
A programming language helps the programmer to interact with the computer. What ever we write in english language converts to machine readable format and the results or errors given by computer again converts to english language so that programmer can understand it.
What is the difference between Low level programming language and High level programming language ?
Low level programming languages are machine understandable codes or close to it. High level languages are programmer understandable codes. Machine can not understand these codes so we need compiler or interpreter to convert these codes to machine understandable format. In High level programming language programmer focus on what to do and write code for it and the programming language takes care of how to do it. But in low level languages the programmer has to focus on how to do and can write hardware level programs.
What is the difference between compiler and interpreter ?
Compiler translates all the statements written in program at once and displays errors if any or generates machine understandable code file. While interpreter converts one statement at a time into machine code, if any error found conversion as well as program execution halts there. Compiled codes runs faster then interpreted codes.
Python is a high level programming language. Python programs uses interpreter at the run time. Some of the major versions of Python are Python 1.x, Python 2.x and Python 3.x. In this course we will focus on Python 3.x. Python has several different implementations, written in various languages. In this course we will use the most popular version CPython.
Why is Python named so ?
Well, not so important. But in case you are curious about its name origin then here is the answer. Guido van Rossum (Python inventor) was reading the published scripts from “Monty Python’s Flying Circus”, a BBC comedy series from the 1970s, when working on development of Python. Van Rossum may needed a name that was short, unique, and slightly mysterious, so he might decided to call the language Python.
Why Python is so popular ?
- It uses in numerous areas, including web development, Software development, scientific computing and artificial intelligence.
- It is a dynamically typed language so data types automatically decided based on value assigned. No need to mention data types like other programming language c, c++ and java.
- It supports Object Oriented Programming as well as functional programming or Procedural programming.
- Programmers can express logical concepts in few lines of codes as compared to other programming languages like c, c++ or Java.
Why use IDE to write program ?
For a beginner programmer it is suggestible to use Integrated Development Environment (IDE), because, IDE is a full-fledged environment. It provides all the essential tools a programmer need for software development. It handles the code (for example, write, edit, syntax highlighting and auto-completion) as well as provides other features such as debugging, execution, testing, and code formatting that makes easier for a programmer to write a program.
How to practice python ?
If you have a desktop or laptop or smart phone, your can practice python easily. There are two methods to do it.
- Install python on your desktop or laptop. If you have a smart phone install Python IDE. There are so many options available on internet. For example, You can use Qpython app on you android as well as windows phone.
- Use online python interpreter to practice. Some of the online python interpreter examples are as below
I personally do not like shortcuts but when ever shortcut is available it is not advisable to take long root. As a beginner online interpreter is a best option if you have access to internet.
Let us write our first Python program
This simple program outputs Hello World on the computer screen. Are you wondering why are we always writing Hello World as out first program ? Answer is very simple. We are very excited when we start learning any programming language. Being social, when we meet some one we say hello. Now with the help of programming we are entering a new world so we are saying hello to the new world and announcing that, a new programmer came to the programming world. It definitely gives a moral boost up. Very simple.
Special Note :
There’s no difference between using ” or ‘ (double or single quotes), You can use any.
both has same meaning. But you have to use same type of quotes at the start and at the end. For example if you try to print this code; print(“hello’) it will output an error message since we started with a double quote and finished with a single quote around hello. What about the below line of code :
print(‘I’m Subrat Dash’)
Will it give us output? No, it results error. So there are two ways to do this as below :
print(“I’m Subrat Dash”);
print(‘i\’m Subrat Dash’);
Here \m is called escape sequence, we will read in detail about this on our later chapters.
Have a look at more examples like this :
print(‘He said “Ramesh is a genious.”‘)
print(“He said \”Suresh is also a genious.\””)