PYTHON PROGRAMMING LANGUAGE
Python is a high level programming language, it is dynamic in nature in the sense that it support code understandability. The rules in which words are formed in Python helps user (.i.e. programmers) to code easily in fewer period of time. Python can also be described as an Object Oriented programming language that is user-friendly, easily interpreted and it’s a beginner programming language.
FEATURES OF PYTHON PROGRAMMING LANGUAGE.
- As object oriented scripting language, it support the use of functional and structural method of programming.
- Python also support the use of GUI that is portable and can be used on other windows system.
- It is easy to learn has it has few keyword, well defined syntax and a good structured.
- Its program instruction is easily read and understood.
- Maintainability is quite easy in Python.
- It can be easily integrated to other programming language such as C, C++, and Java etc.
- It support automatic garbage collection.
ADVANTAGES AND DISADVANTAGES OF PYTHON.
Python programming language has a lot of likeness with almost all OOP (object oriented programming language) and also some differences which are discussed below.
Python as a programming language can be used to develop various application in the field of software creation such as game development, Web framework, language development graphic design application. It also makes use of prototype model in its software development model (techniques). The advantages of Python program as discussed below;
- Python provides support libraries for programmers to use during coding in other to limit the size or length of the instruction written.
- Python programming language is can be invoked in other programming language has it has powerful tools capabilities.
- Python helps to increase programmer level of productivity etc.
Python programming language has various advantages that has made it preferable to other programming languages but with all its numerous advantages, is still lacking in one or two areas.
- Python addict find it complex and unfriendly using other programming language as they are used to Python features, syntax and its standard libraries.
- Python has made a head way in laptops, desktop and many other server platform but it is less compatible with mobile computing.
- Python is slow in terms of execution speed as it makes use of an interpreter not a compiler.
- It requires more testing time because it is dynamically typed leading to many design restrictions.
PYTHON CODING STYLE
- Do not mix tabs and spaces. (Tabs create confusion and it is recommended to use only spaces).
- Maximum line length is 79 characters which help users with a small display.
- Use blank lines to separate top-level function and class definitions and single blank line to separate methods definitions inside a class and larger blocks of code inside functions.
- When possible, put inline comments (should be complete sentences).
- Use spaces around expressions and statements.
PYTHON DATA TYPES
There are various way in which data can be stored, the kind of operation that are performed on the data also count. There are five (5) standard data types used in Python programming language which are;
Note: Python support the use of four different numeric types which are;
- Int (Signed integer)
A program in python to sum two numbers.
# This program adds two numbers
num1 = 1.5
num2 = 6.3
# Add two numbers
sum = float(num1) + float(num2)
# Display the sum
Print (‘The sum of num1 and num2 is”, sum)
The above program, shows how to compute the sum of two numbers. The # in the program is use to indicate comment.