This report is an overview of
Python, that goes into depth with what are the real implementations on certain applications,
its history for instance – when it was invented, who invented it, and why they
invented it. As well as seeing why people use it more than other programming
languages, such as Java.
Finally, the basic understanding of Python’s line coding, variable names, variable types,
method call mechanisms, and error handling.
2.1 Breif Back-story
Python was conceived in the late 1980s, implemented on December 1989 and
was release on February 1991, by a man named Guido van Rossum. Whose reason for
creating the program was to improve upon its predecessor the ABC programming
language, which van Rossum find it to have many problems. Van Rossum needed a
name that was unique, mysterious and short, hence the name Python was chosen. (L.
V. Tulchak & ?. ?. ??rchuk, 2012)
i) Why do people use Python?
As shown in figure 1 Python is the most used program in the world, and coming
in at second is Java. The reason being is simply because it is easier to
understand and use. Many
programmers view Python as a language with a clean syntax and an extensive
library, thanks to its long-life cycle.
In Addition, a programmer by the name of Tim
Peters formed his own principles or “The
Zen of Python” as he puts it, (Python.com, 2004):
§ Readability is important
§ Complex is better than complicated
§ Beautiful is better than ugly
§ Simple is better than complex
§ Explicit is better than implicit
(Fun Fact: This can
be found as an Easter egg in the program itself by typing ‘import this’, to learn more go to the appendix to see the image
and a link to the video.)
Like many popular languages, Python’s
massive user base has created something of a positive feedback. This result has
given the program a problem-solving element due to the overwhelming number of
third-party documents, books and experienced programmers providing tutorials
and lectures on how to use the programming language, meaning that it’s easy for
new programmers to reach out or search for the help they need. Because of this
there are so many people who program with it, any problems or questions can
usually be solved quickly. Therefore ensuring, that people are still
programming with Python ().
is it used for?
Python is used for many jobs and applications that utilise its
potential, here are some ways that it is
Development — Python is often used as a
support language for developers to program, document,
test, and fix bugs which is involved in creating and maintaining applications, such as Game development, Multithread testing, and Mobile
Web Development — It’s not
would mostly use existing open source libraries to speed up the progress in
getting their website up and running. However, most Python users would write
3 Basic Understanding
Integers are whole
number that have no decimal places, for example
z = 5 / 2 # Answer is 2, integer division.
real numbers that are written with a decimal point separating the integer and
fractional parts, for example (tutorialspoint.com, 2017):
x = 3.456
Strings are used
for creating to display text they can be used in single quotes or double quotes,
which are the same thing for example (tutorialspoint.com,
can occur within the string, for example (tutorialspoint.com,
double-quotes is used for multi-line strings or strings that comprise of both (‘)
and (“) inside of them, for example (tutorialspoint.com, 2017):
3.2 Line Coding
o Like many other program languages, the (=) is used to
assign variables to values. Another Expression is the (= =) which is used for
true/false expressions to check if one value is equal to another ().
o For adding, subtracting, dividing and multiplying
numbers the symbols are just as expected (+ – * / %). But sometimes they can
have special uses such as (+) for string concatenation, which is to join two
strings to form a third and (%) for string formatting, which encloses variables
into a fix list ().
o Logical operators are words (and, or, not) not symbols,
and as well variable types don’t need to be declared, Python can figure out the
variable types on its own ().
o The symbol for commenting on a line code is (#) this
allows you to further explain a section of code, that cannot be clarified or
known what it does ().
ii) Sample of Python line coding:
= 34 – 23 # Subtracting.
= “Hello” # Assigning.
z == 3.45 or y == “Hello”: # Declaring
5 x = x + 1
6 y = y + “World” # String concatenation.
The simplicity of Python’s coding gives it the edge over other languages
because it’s easier to understand. Here you can see a side by side comparison
of the print function shown
in the table below (Skip Montanaro, 2009).
Print (“Hello, world!”)
public class HelloWorld
void main (String args)
print the integers from 1 to 9for i in range (1,10): print (i)
int myCounter = 0;String myString = String.valueOf(myCounter);if (myString.equals(“0”))
Python does not have an automatic error detection, for it to detect any
errors you must go to the Run and click onto Check
Module, as seen in Figure 2 ().
From there it will show all the errors that are in your code. For an
error to pop up first, an invalid
syntax window prompts indicating that there is an error in the code.
Second, the place in the line code where the error is detected is highlighted
as red as shown in figure 3: the empty space at the end of the line is changed
to a bright red indicating that there is an error. To fix the problem you need
to dismiss the pop-up window by clicking the OK button and then editing the code itself to correct the
In conclusion, the easiness of the Python language has given it the
advantage over other languages, after 20 years Python is widely used today by
thousands of programmers, for many different applications from testing
microchips to developing websites. We won’t know how the program is going to
end up, but it isn’t going anywhere anytime soon.