O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Feature of python

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
Python quick guide1
Python quick guide1
Carregando em…3
×

Confira estes a seguir

1 de 16 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a Feature of python (20)

Anúncio

Mais recentes (20)

Anúncio

Feature of python

  1. 1. PYTHON PROGRAMMING Prof. Sunil D. Chute Dept. of Computer Science M. G. Arts,Sci & Late N. P. Commerce College Armori
  2. 2. WHAT IS PYTHON PROGRAMMING LANGUAGE? • Python is an object-oriented programming language created by Guido Rossum in 1989. It is ideally designed for rapid prototyping of complex applications. It has interfaces to many OS system calls and libraries and is extensible to C or C++. Many large companies use the Python programming language, including NASA, Google, YouTube, BitTorrent, etc.
  3. 3. PYTHON FEATURES • Python is a dynamic, high level, free open source and interpreted programming language. It supports object-oriented programming as well as procedural oriented programming. In Python, we don’t need to declare the type of variable because it is a dynamically typed language. For example, x = 10 Here, x can be anything such as String, int, etc.
  4. 4. FEATURES IN PYTHON 1. Easy to code: Python is a high-level programming language. Python is very easy to learn the language as compared to other languages like C, C#, Javascript, Java, etc. It is very easy to code in python language and anybody can learn python basics in a few hours or days. It is also a developer-friendly language. 2. Free and Open Source: Python language is freely available at the official website and you can download it from the given download link below click on the Download Python keyword. Since it is open-source, this means that source code is also available to the public. So you can download it as, use it as well as share it.
  5. 5. 3. Object-Oriented Language: One of the key features of python is Object-Oriented programming. Python supports object-oriented language and concepts of classes, objects encapsulation, etc. 4. GUI Programming Support: Graphical User interfaces can be made using a module such as PyQt5, PyQt4, wxPython, or Tk in python. PyQt5 is the most popular option for creating graphical apps with Python. 5. High-Level Language: Python is a high-level language. When we write programs in python, we do not need to remember the system architecture, nor do we need to manage the memory. 6. Extensible feature: Python is a Extensible language. We can write us some Python code into C or C++ language and also we can compile that code in C/C++ language.
  6. 6. 7. Python is Portable language: Python language is also a portable language. For example, if we have python code for windows and if we want to run this code on other platforms such as Linux, Unix, and Mac then we do not need to change it, we can run this code on any platform. 8. Python is Integrated language: Python is also an Integrated language because we can easily integrated python with other languages like c, c++, etc. 9. Interpreted Language: Python is an Interpreted Language because Python code is executed line by line at a time. like other languages C, C++, Java, etc. there is no need to compile python code this makes it easier to debug our code. The source code of python is converted into an immediate form called bytecode. 10. Large Standard Library Python has a large standard library which provides a rich set of module and functions so you do not have to write your own code for every single thing. There are many libraries present in python for such as regular expressions, unit-testing, web browsers, etc.
  7. 7. 11. Dynamically Typed Language: Python is a dynamically-typed language. That means the type (for example- int, double, long, etc.) for a variable is decided at run time not in advance because of this feature we don’t need to specify the type of variable.
  8. 8. HOW TO INSTALL PYTHON IDE Step 1) To download and install Python, visit the official website of Python https://www.python.org/downloads/ and choose your version. We have chosen Python version 3.6.3
  9. 9. • Step 2) Once the download is completed, run the .exe file to install Python. Now click on Install Now.
  10. 10. • Step 3) You can see Python installing at this point.
  11. 11. • Step 4) When it finishes, you can see a screen that says the Setup was successful. Now click on "Close".
  12. 12. HOW TO INSTALL PYCHARM • Step 1) To download PyCharm visit the website https://www.jetbrains.com/pycharm/download/ and Click the "DOWNLOAD" link under the Community Section. • Step 2) Once the download is complete, run the exe for install PyCharm. The setup wizard should have started. Click “Next”. • Step 3) On the next screen, Change the installation path if required. Click “Next”. • Step 4) On the next screen, you can create a desktop shortcut if you want and click on “Next”. • Step 5) Choose the start menu folder. Keep selected JetBrains and click on “Install”. • Step 6) Wait for the installation to finish. • Step 7) Once installation finished, you should receive a message screen that PyCharm is installed. If you want to go ahead and run it, click the “Run PyCharm Community Edition” box first and click “Finish”. • Step 8) After you click on "Finish," the Following screen will appear.
  13. 13. PYTHON BASIC SYNTAX • The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages. First Python Program Let us execute programs in different modes of programming. Interactive Mode Programming Invoking the interpreter without passing a script file as a parameter brings up the following prompt
  14. 14. Type the following text at the Python prompt and press the Enter: >>> print "Hello, Python!“ If you are running new version of Python, then you would need to use print statement with parenthesis as in print " Hello, Python! " ;. However in Python version 2.4.3, this produces the following result: Hello, Python!
  15. 15. SCRIPT MODE PROGRAMMING • Invoking the interpreter with a script parameter begins execution of the script and continues until the script is finished. When the script is finished, the interpreter is no longer active. Let us write a simple Python program in a script. Python files have extension .py. Type the following source code in a test.py file: print "Hello, Python!“ We assume that you have Python interpreter set in PATH variable. Now, try to run this program as follows − $ python test.py
  16. 16. This produces the following result: Hello, Python! Let us try another way to execute a Python script. Here is the modified test.py file − #!/usr/bin/python print "Hello, Python!" We assume that you have Python interpreter available in /usr/bin directory. Now, try to run this program as follows − $ chmod +x test.py # This is to make file executable $./test.py This produces the following result − Hello, Python!

×