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.

  1. As object oriented scripting language, it support the use of functional and structural method of programming.
  2. Python also support the use of GUI that is portable and can be used on other windows system.
  3. It is easy to learn has it has few keyword, well defined syntax and a good structured.
  4. Its program instruction is easily read and understood.
  5. Maintainability is quite easy in Python.
  6. It can be easily integrated to other programming language such as C, C++, and Java etc.
  7. 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.

ADVANTAGES.

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;

  1. Python provides support libraries for programmers to use during coding in other to limit the size or length of the instruction written.
  2. Python programming language is can be invoked in other programming language has it has powerful tools capabilities.
  3. Python helps to increase programmer level of productivity etc.

DISADVANTAGES.

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.

  1. Python addict find it complex and unfriendly using other programming language as they are used to Python features, syntax and its standard libraries.
  2. Python has made a head way in laptops, desktop and many other server platform but it is less compatible with mobile computing.
  3. Python is slow in terms of execution speed as it makes use of an interpreter not a compiler.
  4. It requires more testing time because it is dynamically typed leading to many design restrictions.

PYTHON CODING STYLE

  1. Do not mix tabs and spaces. (Tabs create confusion and it is recommended to use only spaces).
  2. Maximum line length is 79 characters which help users with a small display.
  3. 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.
  4. When possible, put inline comments (should be complete sentences).
  5. 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;

  1. Numbers
  2. String
  3. List
  4. Tuples
  5. Dictionary

Note: Python support the use of four different numeric types which are;

  • Int (Signed integer)
  • Long
  • Float
  • Complex

A program in python to sum two numbers.

Solution.

# 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.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here