Thursday, 4 July 2019

Introductions


Python Introduction

Today's topics are:
1.           What is Python?
2.           Features of Python
3.           Applications of Python

What is Python?

Python is a high-level programming language. Example for the high-level languages: Java, c++,c, Python,….etc

Low-level language: giving instructions to CPU. Example: Machine level language, Assembly languages, etc

Python is high level and scripting language as well

Program
Scripting
A program is a collection of statements. Or it is a sequence of instructions written so that a computer can perform a specific task
A script is a code written in a scripting language. Type of programming language in which we can write code to control another application

Where we can use Python:
1.  To develop applications. (Desktop application /Web application)
2.  For developing a database application.
3.  For networking programming
4.  For developing games
5.  Python is a prerequisite programming language for Machine learning and Artificial Intelligent applications
6.  For IoT (Internet Of Things)

Youtube and Google also using Python language coding. NASA and Network Stock Exchange Applications developed by Python.
Python was invented in the Netherlands, early 1990’s by Guido Van Rossum.
Features of Python:
1.  Simple and easy to learn.
Python is a simple programming language. When we read a Python program, we can feel like reading an English statement.
The Python syntax is very simple.

For example I want to display a message "Good afternoon" in C and Java Language

C language:
#include<stdio.h>
#include<conio.h>
void main()
{
 printf(“Good afternoon”);
 getch();
}
Output:
Good afternoon.

In Java:
import java.lang.*;
class First
{
 public static void main(String args[])
 {
   System.out.println(“Good afternoon”);
 }
}

You can see the difference in how simple syntax Python is: Just single line code to display "Good afternoon"

Python:
Print(“Good afternoon”)

2.  Python is open source (Free software):
We can use Python software without any license and it is a free software.
We can download the code based on our requirement and we can customize based on our requirement.

3.  Python is high-level programming language:

Programming languages are two types: 1. Low level (2.) High-level programming language.
A low-level programming language uses machine-level code instructions to develop a program. These instructions directly interact with the CPU. Machine level and assembly languages are called low level.
Example: Machine level example: 0’s and 1’s
Assembly language: add a to b
High-Level Programming Language:  It is just like an English like words to develop a program (applications) These high-level languages are easy to learn and use.
Ex: c++,c, java, python,PHP,….etc
Python also uses English words in its program.
Example: print(“Good afternoon”)

4.  Python is a Platform independent:
When a python program is compiled(translated) using python compiler(translator), it generates byte code. Python byte code represents a fixed set of instructions that run (execute) on all the operating systems and hardware.

What is Cross-Platform:

Platforms are differentiated: 

1. Software platforms such as operating system like Windows, Mac OS X, Android, etc.

2. Hardware platforms like different computer or processor architecture.

For example, if I write a program for Windows and compiles the code for Windows-specific functions and a Windows executable file, the program would not run in other operating systems like Mac OS/Linux 

Javascript program is an example of cross-platform software. Since as long as the browser you're using knows how to interpret Javascript codes, the program will run regardless of the platform it is on.

Software that can run on multiple types of computer systems. For example, the graphics program Adobe Photoshop and the word processor Microsoft Word are both available for the Windows and Macintosh operating systems. Therefore, Photoshop and Word are considered to be cross-platform applications.

While "cross-platform" is typically used to describe computer software, it can refer to hardware as well. For example, peripherals such as keyboards, speakers, printers, scanners, and cameras that work on both Mac and PC are cross-platform. Software and hardware that work on more than one platform are also called multiplatform.

An application(s/w) will execute on multiple types of computers.


Cross-platform means your program (Application) can work on different platforms example Windows, Linux, and Mac.

Platform Independent means your code is Write once Run Anywhere i.e. you don't need to change your code to run on different platforms

All platform-independent programs (Applications/Softwares) are cross-platform.


What is Case Sensitive?
Python language is case sensitive Language. Case sensitive means that a is different from A (i.e) small letter 'a' is not equal to Capital letters 'A' . The variable or identifier of Sravanthi is different from the variable or identifier of sravanthi.

What is the prerequisite to learn Python?
It is not mandatory to know any other programming language before learning Python. If you have time to learn and interest in programming, then you can easily learn Python. The prerequisite for learning Python is basic knowledge of concepts like Variables, Loops, Control Statements, etc.


Next Topic: Features of Pythons

You may like the following concepts:
Other tutorials


No comments:

Post a Comment

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(&qu...