Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lecture 1 Intro

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1.

Python is a widely-used general-purpose, high-level programming


language.

2. initially designed by Guido van Rossum in 1991 and developed by Python


Software Foundation.

3. It was mainly developed for emphasis on code readability & economy i.e.
its syntax allows programmers to express concepts in fewer lines of code.

4. Working on Python started in the late 1980s in Netherlands.

5. The programming language which Python is said to have succeeded is


ABC Programming Language.

6. The language was finally released in 1991.

7. Python uses fewer lines of code compared to Java, C++ & C.

8. Python has better code readability and results in better developer


productivity.

9. Latest Stable version

10. The two of the most used versions are Python 2.x & 3.x.

11. Python is the most popular coding language in the world

12. Python has been an inspiration for many other coding languages
such as Ruby, Cobra, Boo, CoffeeScript ECMAScript, Groovy, Swift Go,
OCaml, Julia, etc.
Key Features of Python :

1. Easy To Learn and Readable Language

a. Simple Syntax

b. Easy to Read : Use of Indentation in place of curly braces in Python

2. Interpreted Language

a. IDLE (Interactive Development Environment) is an an interpreter

b. IDLE executes and displays the output of one line of Python code at a time.

c. Displays errors while running lines of Python code and displays the entire
stack trace for the error.

3. Dynamically Typed Language

a. No need to declare the data types of the variables which we define.

b. Python interpreter determines the data types of the variables at runtime based
on the types of the parts of the expression. (It makes coding easier for
programmers but may lead to runtime errors).

4. Open Source & Free

Python is an open-source programming language and one can download it for


free from Python’s official website. The community of Python users is constantly
contributing to the code of Python in order to improve it.
5. Large Standard Library

a. The standard library of Python is large and saving developers both time and
effort.

6. High-Level Language

7. Object Oriented Programming Language

Python supports various programming paradigms like structured programming,


functional programming, and object-oriented programming.

Object-Oriented approach of Python allows its users to implement the concepts


of Encapsulation, Inheritance, Polymorphism, etc. which is extremely important
for the coding done in most Software Industries as objects map to entities in real-
world and lot of real-world problems can be solved using the Object-Oriented
Approach.

8. Large Community Support

With one of the biggest communities on StackOverflow and Meetup, Python has
gained popularity over the years. If we need any kind of help related to Python,
the huge community is always there to answer our queries. A lot of questions
about Python have already been answered on these sites and Python users can
reference them as per requirement.

9. Platform Independent

Platform independence is yet another amazing feature of Python. In other words,


it means that if we write a program in Python, it can run on a variety of platforms,
for instance, Windows, Mac, Linux, etc. We do not have to write separate Python
code for different platforms.
10. Extensible and Embeddable

Python is an Embeddable language. We can write some Python code into C or


C++ language and also we can compile that code in C/C++ language. Python is
also extensible. It means that we can extend our Python code in various other
languages like C++, etc. too.

11. Graphical User Interface (GUI) Support

Yet another interesting feature of Python is the fact that we can use it to create
GUI (Graphical User Interfaces). We can use free Libraries like Tkinter, PyQt,
wxPython, or Pyside for doing the same. Python also features a large number of
GUI frameworks available for it and various other cross-platform solutions.
Python binds to platform-specific technologies.

Identifiers :

Python Identifier is the name we give to identify a variable, function,


class, module or other object. That means whenever we want to give
an entity a name, that's called identifier. Sometimes variable and
identifier are often misunderstood as same but they are not.

Well for clarity, let’s see what is a variable?

What is a Variable in Python?

A variable, as the name indicates is something whose value is


changeable over time. In fact a variable is a memory location where a
value can be stored. Later we can retrieve the value to use. But for
doing it we need to give a nickname to that memory location so that
we can refer to it. That’s identifier, the nickname.

Rules for Writing Identifiers


There are some rules for writing Identifiers. But first you must know
Python is case sensitive. That means Name and name are two
different identifiers in Python. Here are some rules for writing
Identifiers in python.
1. Identifiers can be combination of uppercase and lowercase letters,
digits or an underscore(_).
So myVariable, variable_1, variable_for_print all are valid python
identifiers.
2. An Identifier can not start with digit. So while variable1 is
valid, 1variable is not valid.
3. We can’t use special symbols like !,#,@,%,$ etc in our Identifier.
4. Identifier can be of any length.

Though these are hard rules for writing identifiers, also there are some
naming conventions which are not mandatory but rather good
practices to follow.

1. Class names start with an uppercase letter. All other identifiers start
with a lowercase letter.
2. Starting an identifier with a single leading underscore indicates the
identifier is private.
3. If the identifier starts and ends with two underscores, than means the
identifier is language-defined special name.
4. While c = 10 is valid, writing count = 10 would make more sense and it
would be easier to figure out what it does even when you look at your
code after a long time.
5. Multiple words can be separated using an underscore, for
example this_is_a_variable.

You might also like