Python is a high level programming language which is based on object oriented
technology. You can interpret it directly. It is an interactive language in web
development applications.
Who developed it???
Guido van Rossum was the
creator.
Advantages:
It has lots and lots of
advantages to programmers.
· It is a portable language.
· It can be compatible with many platforms.
· It has wide range of functions in its library.
· It is GUI based programming language which is
benefit for web programmers and many more…
Let us the journey to
python.
How to start the
python?????
· First, download the python software from python website. Install it to your computer.
Path % Path%; c:\python
Where C:\python
is the path of the python folder in the system.
First program in python:
· Open a notepad application, create a new file
with the name “first.py”
· Type the following program
Print(“ welcome to the world of python”) and Save the program.
· Now, Open the command prompt and run the program by “python first.py”
·
You get the output “ Welcome to the world of python”.
Basics of
python programming
The basics of python programming starts with declaring identifiers and datatypes. The identifier
may be a variable, class or a module. To declare an identifier, some rules are
there. They are as follows.
The identifier name should start with any alphabets (AtoZ,atoz) or
underscore symbol( _ ) followed by digits(0 to 9).
Eg: valid: a, count, _sum, name20
Invalid: b!, c#, v%
Datatypes:
Python has standard data
types. Standard datatypes are numbers, strings,lists, tuples and directory. The
way of declaring python datatypes are given below
Number |
int long float complex |
Strings |
Str1=”Welcome” |
List |
List=[‘name’,21,’it dept’,’abc college’] |
Tuple |
Tuple=[‘name’, 34,’cse dept’,’cde college’] |
Directory |
Dict={} Dict[‘first’]=” first name” Dict[id]=”abc1” |
These are basics of python programming. Next part deals with the operators, expressions and conditional statements.
No comments:
Post a Comment