0% found this document useful (1 vote)
244 views

Python 01 Intro

Python is a high-level, human-readable programming language that is processed by the Python interpreter. It was developed in the late 1980s by Guido van Rossum and draws elements from languages like C, C++, and Unix shell scripts. Python code is organized through indentation rather than brackets or keywords, making it easy to read. It is an open source, versatile language suitable for tasks like web development, science, and system scripting.

Uploaded by

reetasahoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
244 views

Python 01 Intro

Python is a high-level, human-readable programming language that is processed by the Python interpreter. It was developed in the late 1980s by Guido van Rossum and draws elements from languages like C, C++, and Unix shell scripts. Python code is organized through indentation rather than brackets or keywords, making it easy to read. It is an open source, versatile language suitable for tasks like web development, science, and system scripting.

Uploaded by

reetasahoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Reeta Sahoo & Gagan Sahoo

What is programing language?

We already know that computer works on instructions. Such group of


instructions are known as program and when it is written in a computer’s
language then we called it as programing language. There are many such
programing languages like, Basic, C, C++, Java, Python, etc.

Reeta Sahoo & Gagan Sahoo


Let us see some of instructions:
Basic C

10 Let A = 10 #include <stdio.h>


20 Let B = 20 void main()
30 Let S= A+B {
40 PRINT S Int A = 10, B = 20;
int C = A + B;
printf ("%d", C)
}

C++ Java

#include <iostream.h> import java.io.*;


void main() public class AddTwo
{ {
int A = 10, B = 20; public static void main(String[] args)
int C = A + B; {
cout << C; int A = 10, B = 20;
} int C = A + B;
System.out.print(C);
}
}
Reeta Sahoo & Gagan Sahoo
C# (C-Sharp) Python

using System; A, B = 10, 20


using System.Collections.Generic; C=A+B
using System.Text; Print (C)
namespace test
{
class AddTwo
{
static void Main()
{
int A = 10, B = 20;
int C = A + B;
Console.WriteLine(C);
}
}
}

Reeta Sahoo & Gagan Sahoo


Python is a high-level (human-readable) programing
language that is processed by the Python
“interpreter” to produce results.

The Python language was developed by Guido van


Rossum in the late eighties and early nineties at the
National Research Institute for Mathematics and
Computer Science in the Netherlands. Python is
derived from many other languages, including C, C++,
the Unix shell and other programing languages.

Reeta Sahoo & Gagan Sahoo


As Python is intended to be highly readable, it uses English keywords frequently where
other languages may use punctuation. For example, in the Pascal programing language,
blocks start with the keyword begin and end with the keyword end and in the C
programing language, blocks are enclosed within curly brackets ({ } braces).
But in Python, grouping blocks of statements by indentation is easy understanding and
minimizes coding also. Let us see a sample format of a conditional statement if:

if Condition/expression :

statement 1 if Expression is True, statements are


..... indented and will be executed
statement N

else:

statement 1
..... if Expression is True, statements are
statement M indented and will be executed

Reeta Sahoo & Gagan Sahoo


More on blocks

Reeta Sahoo & Gagan Sahoo


Some of its key distinguishing features include:

Python is free – is open source distributable software.


Python is easy to learn – has a simple English language syntax.
Python is easy to read – is uncluttered by punctuation.
Python is easy to maintain – is modular for simplicity.
Python is “batteries included” – provides a large standard libraries for easy integration into your own
programs.
Python is interactive – has a terminal for debugging and testing snippets of code.
Python is portable – runs on a wide variety of hardware platforms and has the same interface on all
platforms.
Python is interpreted – there is no compilation required.
Python is high-level – has automatic memory management.
Python is extensible – allows the addition of low-level modules to the interpreter for customization.
Python is versatile – supports both procedure-orientated programing and object-orientated
programing (OOP).
Python is flexible – can create console programs, windowed GUI (Graphical User Interface)
applications and CGI (Common Gateway Interface) scripts to process web data.

Reeta Sahoo & Gagan Sahoo


Remember
A byte code is a byte-
long instruction that
the Python compiler
generates and the
Python interpreter
executes. When the
compiler compiles a .py
file, it produces a series
of byte codes.

Reeta Sahoo & Gagan Sahoo

You might also like