1-1 Introduction
1-1 Introduction
High-level
programming
Low-level
programming
Features of High-Level Languages
A few features that are possessed by high-level languages which are
not available in low-level languages:
ü Selection and iteration constructs, such as IF… THEN…
ELSE…, FOR… ENDFOR, WHILE… ENDWHILE.
ü Boolean operators such as AND, OR, and NOT to construct
complex conditional statements.
ü Identifiers using an unlimited number of alphabetic and
numeric characters and some special characters to allow
variable names to be made meaningful and sensible.
ü Data structures such as arrays, lists, tuples, and dictionaries
(records).
ü High-level languages are relatively easy to learn and much
faster to program in.
Program Translators
High-level languages (and assembler languages) need to be translated
into machine code for a computer system to understand it.
There are three types of translators that will do the translation:
(1) Assemblers ➤ to translate assembly language into machine code.
(2) Compilers ➤ to convert high-level programming language to
low-level programming language; compilers translate all the
source code at the same time to create the compiled code, or
machine code, also known as the object code.
(3) Interpreters ➤ they are similar to compilers, are used to convert
high-level programming language to low-level programming
language. The difference between a compiler and an interpreter is
that the interpreter converts the program one line of code at a
time and reports errors when detected, while also doing the
conversion.
Compiled & Interpreted Languages
A compiled language is a programming language which are
generally compiled and not interpreted. It is one where the source
code, once compiled, is expressed in the instructions of the target
machine; this machine code is undecipherable by humans. Examples
of compiled language are Ada, Algol, Visual Basic, PureBasic, C,
C++, C#, D, Java, COBOL, Cobra, Crystal, Eiffel, Erlang, Fortran,
Julia, Go, Haskell, Pascal, etc.
C#
https://data-flair.training/blogs/python-compilers/
Python 2 vs. Python 3
There are two main kinds of Python:
- Python 2
- Python 3
There are many Python IDEs available freely on the internet for all
operating systems. Some of free Python IDEs that I recommend for
beginners:
(1) Spyder (https://www.spyder-ide.org)
(2) Thonny (https://thonny.org)
(3) Visual Studio Code (https://code.visualstudio.com)
(4) For advanced users: Sublime Text (https://www.sublimetext.com)
Python Libraries/Packages
What is a Python library?
➡ A library is a collection of code that makes everyday tasks
more efficient.