1 - Intro To Python
1 - Intro To Python
Here's what the same program might look like in a high-level language:
R1=1;
R2=2;
R3 = R1 + R2;
The variation between different programming languages can be quite
extensive. Traditionally, the first program a programmer writes in a new
language is Hello World—a simple program that outputs the phrase
"Hello World!" (or a variation thereof) to the user. As will be clear from the
following examples, even this seemingly simple task can be expressed in
many different ways depending on which language is being used.
For example:
In Python: In Pascal :
begin
writeln(‘Hello World’);
end.
In C++: In Java:
int main() {
public static void main(string[] args)
{
{
System.out.println("Hello World!");
cout<<"Hello World!"<<endl; }
return 0; }
}
In BASIC: In Perl:
Sub Main()
Console.WriteLine ("Hello World!")
End Sub
End Module
In C#:
Console.WriteLine("Hello, World!");
WHY SHOULD WE CREATE COMPUTER
PROGRAMS?
• Utility
Ensure your program effectively and fulfills the need it is addressing.
• Usability
Ensure that people can easily use your program without a major time
investment.
• Maintainability
Ensure that it is easy to understand, fix, and improve your program
without a major time investment.
History of Python
Python was originally conceptualized by Guido van Rossum
in the late 1980s as a member of the National Research
Institute of Mathematics and Computer Science. Initially,
it was designed as a response to the ABC programming
language that was also foregrounded in the Netherlands.
Among the main features of Python compared to the ABC
language was that Python had exception handling and
was targeted for the Amoeba operating system.
Fun fact. Python is not named after the snake. It’s named after the British TV
show Monty Python.
Python, like other languages, has gone through a number of versions. Python
0.9.0 was first released in 1991. In addition to exception handling,
Python included classes, lists, and strings. More importantly, it included
lambda, map, filter and reduce, which aligned it heavily in relation to
functional programming.
History of Python - cont’d
In 2000, Python 2.0 was released. This version was more of an open-source
project from members of the National Research Institute of Mathematics and
Computer Science. This version of Python included list comprehensions, a full
garbage collector, and it supported Unicode.
Python 3.0 was the next version and was released in December of 2008 (the latest
version of Python is 3.10.7). Although Python 2 and 3 are similar there are subtle
differences. Perhaps most noticeably is the way the print statement works, as in
Python 3.0 the print statement has been replaced with a print() function.
IDE
An Integrated Development Environment (IDE) (also known as
Integrated Design Environment, Integrated Debugging Environment or
Interactive Development Environment) is a software application that
provides comprehensive facilities to computer programmers for software
development. An IDE normally consists of:
• a debugger
Compiler or Interpreter
A compiler is a computer program (or set of programs) that transforms
source code written in a programming language (the source language)
into another computer language (the target language, often having a
binary form known as object code). The most common reason for
wanting to transform source code is to create an executable program.
Back
Debugger
Debugger or debugging tool is a computer program that is used to test and
debug other programs (the "target" program).
Back