Skip to main content

Posts

Showing posts with the label Python

Syllabus

Python Tutorials Python Tutorial Python Overview Python Installation Basics of Python Programming Python Operators Python Keywords Python Numbers Python Strings Python Data Types Python Variables Python Lists Python Tuples Python Date and Time Python Decision Making Python Loops Python File Handling Python Dictionaries Python Functions Python Modules Python Exceptions Handling Python Object Oriented Inheritance in Python Python Regular Expressions Python Networking Programming Python Multithreaded Programming Python CGI Programming Python Database Connection Python Metaprogramming Python Data Processing And Encoding Python GUI Programming

Python Tutorial

               Python Tutorials             Python Tutorial Python is a general purpose object-oriented programming language with high-level programming capabilities. This Python tutorial series will help you to get started in Python programming language from scratch. Prerequisites To learn Python Programming Language you haven’t required any previous programming knowledge, but the basic understanding of any other programming languages will help you to understanding the Python Programming Concepts quickly. Python Programming Example A quick look at the example of  Hello, World!  in Python programming, and detailed description is given in the  Python Basics  page. Example: #!/usr/bin/python print "Hello, World!" Output: Hello, World! The above example has been used to print  Hello, World!  text on the screen.

Python Overview

Python Overview Python is a general purpose object-oriented programming language with high-level programming capabilities. It has become famous because of its clear and easily understandable syntax, portability and easy to learn. Some Facts About Python Python was developed in the late eighties i.e. late 1980’s by  Guido van Rossum  at the  National Research Institute for Mathematics and Computer Science  in the Netherlands as a successor of ABC language capable of exception handling and interfacing. Python is derived from programming languages such as: ABC, Modula 3, small talk, algol-68. PHP page is a file with  .py  extension that contains could be the combination of HTML Tags and Python scripts. In December 1989 the creator developed the 1st python interpreter as a  hobby  and then in 16 October 2000, Python 2.0 was released with many new features. On 3rd December 2008,  Python 3.0  was released with more testing and includes new fea...

Basics of Python Programming

Basics of Python Programming Python is an interpreted programming language. Python source code are compiled to byte code as  .pyc  file, and this byte code can be interpreted. There are two modes for using the Python interpreter: Interactive Mode Script Mode Interactive Mode Without passing python script file to interpreter, directly execute code to Python prompt. Example: >>> 2 + 6 Output: 8 The chevron in the beginning of the 1st line, i.e. the symbol  >>>  is a prompt the python interpreter uses to indicate that it is ready. If the programmer types 2+6, the interpreter replies 8. Script Mode Alternatively, programmers can store Python script source code in a file with  .py  extension, and use the interpreter to execute the contents of the file. To execute the script by the interpreter, you have to tell the interpreter the name of the file. For example, if you have a script name  MyFile.py  and you’re working on Unix, to run th...

Python Installation

Python Installation Python source code is available under the GNU General Public License (GPL). Python interpreter is free and downloads are available for all major platforms (Windows, Mac OS and Linux ) in the form of  source  and  binary . You can download it from the Python Website:  python.org . Although Python version 3 is latest, version 2 is widely used for development. Install Python on Linux The Python interpreter is usually installed as:  /usr/local/bin/python  on those machines where it is available; putting:  /usr/local/bin  in your UNIX shell’s search path makes it possible to start it by typing the command “ python ” to the shell. Python 3 can be installed On Ubuntu Linux by using the following command from terminal. $sudo apt-get install python3-minimal Install Python on Windows On Windows machines, the Python installation is usually placed in  C:\Users\UserName\AppData\Local\Programs\Python\Python(Version) , though y...

Python Operators

Python Operators Operators provides a vital role in programming, and in combination with values and other identifiers form expressions and statements, which is also an important building block for Python programming. Operators and Operands Python operators are symbol that is used to perform mathematical or logical manipulations. Operands are the values or variables with which the operator is applied to, and values of operands can manipulate by using the operators. Let us take a Scenario: 6 + 2=8, where there are two operands and a plus (+) operator, and the result turns 8. Here a single operator is used to manipulate the values. The +, -, *, / and ** does addition, subtraction, multiplication, division & exponentiation respectively. Types of Python Operators Python programming language is rich with built-in operators. The following types of operators are supported by Python: Arithmetic Operators Assignment Operators Comparison (Relational) Operators Logical Operators Identity O...

Python Numbers

Python Numbers As we know, programming languages have their prime things –  Numbers ,  Data types ,  Strings ,  Variables  etc, which play a major role in constructing a program. When we say Numbers, we mean to say Python programming supports integers, floating point numbers and complex numbers. These are number-based data types that store various types of numeric values. Number objects get generated when programmers assign a value to them. For example: Example: #!/usr/bin/python variable_name1 = 10 variable_name2 = 6.2 These reference to number objects can also be deleted by using  del  statement. The syntax for “del” statement is: Syntax: del variable_name[, variable_name2[….variable_name-N] In Python the numeric variables are defined as: int float complex All of them act as a class in Python, where integers and floating point/decimal values are separated based on the presence or absence of decimal point between the values. 6 is an integer whereas ...

For Programs Click Here