Introduction to Python
What is Python ?
Those who are coming from a coding background already know that python is a programming language or if you dont know dont worry i’m here to tell you about everything about python.
So, lets started. Python is an interpreted ( run line by line ), general-purpose ( use every where ) and high-level programming language ( easy readable and understandable ). It was created by Guido van Rossum during 1985 – 1990.
Why to learn python?
Python is very easy language to learn as compare to other programming language it is widely used. It supported all the funcationality of other programming lanuages like Object-oriented and functional programming and many more. It uses english keywords where as other languages use punctuation.
Advantages : –
- Easy to learn, read and write
- Its improved productivity you do not need to write more code you can simply write less and your work is done. Because every thing in python is already written you have to just import modules ( if you don’t understand import modules don’t worry we talk about later ) these code and use them very easily That’s why it also called write less and do more.
- Dynamically typing its automatically know the type of variables you dont need to declare its type.
- Free and open source, you can use python for free and its has very large community to support so you will never stuck at any point.
- Portability once you write the code you can run at any platforms.
- you can start your career in web development, mobile development,descktop development,machine learning,A.I, Data science and automation with the help of by learning its frameworks, library and modules.
Disadvantages : –
- Slow speed as compare to any other programming languages like c,c++, java it quite slower than these langauges.
- Weak in mobile computing
- Database access
- Runtime errors
Modules in Python
A module is a file containing code written by somebody (else usually ) which can be imported and used in our programs.
Types of modules:-
- Builtin modules :- Those modules that are allready comes with python we do not need to import them. like ( os, apc ) etc.
- External modules :- Those modules which are imported that are wriiten by some one else using PIP. Like ( flask, django, tenserflow , pandas, numpy ) etc.
What is pip ?
Pip is a package manager for python you can use pip to install a module in your program.
go to terminal or powershell and type but first python is install in your pc. To install python go to python.org download and simply intsall and after that run this command in your terminal or powershell.
flask is a external module with the help of pip we install flask in our sytstem and use it later accordingly . basically it is use for developming web application or connecting to database ( like mysql ) etc.
REPL ( Read Evaluate print loop )
we can use python simple as a calculator
- Go to terminal
- Type python and press enter.
- now you can do simple maths calculation like ( add muliply subtract divide)
for now its done here . we learn more about python later in this tutorial we seen python installation module if you dont understand dont worry when we do praticale then we understand better .
I hope you gain some knowledge from this post .if you have any quesry or suggestion please do comment.
Thank you!
Comments
Post a Comment