The document provides an introduction to computing, programming, and the evolution of programming languages, detailing the transition from machine language to high-level languages. It explains the software development life cycle (SDLC) and the classification of software, including application and programming software. Additionally, it introduces Python programming, focusing on basic operations, variable types, and the use of the Python IDE (IDLE).
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
10 views33 pages
GET214 (Python) Practical Manual
The document provides an introduction to computing, programming, and the evolution of programming languages, detailing the transition from machine language to high-level languages. It explains the software development life cycle (SDLC) and the classification of software, including application and programming software. Additionally, it introduces Python programming, focusing on basic operations, variable types, and the use of the Python IDE (IDLE).
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
UNIVERSITY OF UYO, UYO
FACULTY OF ENGINEERING =
DEPARTMENT OF COMPUTER ENGINEERING
COMPUTING AND SOFTWARE ENGINEERING LAB
GET 214
STUDENT’S IDENTIFICATIONINTRODUCTION TO COMPUTING
OBJECTIVE
To help students familiarize with basic concepts surrounding computing
understand the evolution of programming and programming languages.
What is Computing?
Computing is the use of computers and associated algorithms to execute cemain
mathematical and processing tasks. These tasks may include data processing
automation of mathematical formulas, information storage and retrieval, dar:
analysis and reports presentation, Computers are design to carry ott these
computational tasks very high speed and accuracy. A typical computer ¢
perform billions of instructions in one second — no human being can attempt s
Computer Program and Programing
A computer program is a set of instructions, written in a specified language called
programming language, to guide a computer to perform specific tasks. Computer
programming on the other hand is the art of analyzing, designing, implemen:
and documenting a computer program.
Evolution of Computer Programming Languages
Computer are designed to take instructions in binary form (0s and Is). These
binary codes form what is called machine language. Machine language consist
of sequence of binary digits (bits) representing instructions, data and operations
in a computer. Machine language is called a low level language, since they are
directly understood by the machine. An example of a machine languece
instruction is a simple addition operation: 01100110 00001010. This binary
sequence represents an instruction that tells the computer to add two numbers
together. Two problems were faced by the machine language. Firstly, it was
difficult to memorize the sequence of bits representing each instruction.
Secondly, it was machine dependent. This means that the instructions set learned
for one processor cannot be applied in another processor.
To address the problem of the difficulty in leaning machine language, assembly
language was born. Assembly language uses mnemonics (Eg. MOV, SUB, ADD.
etc) to represent instructions instead of binary code.
Here's an example of assembly language code that adds two numbers:
+ mov abx, 5: Moves the value 5 into the abx register
mov cdx. 7: Moves the value 7 into the cdx register
2«add abx, edx: Adds the values in abx and cdx and stores the result in abx
‘Theassembly language could however not be understood by the machine directly,
‘A translator was developed to translate the mnemonics to machine language,
which the computer understands. The language translator was called assembler.
Assembly language still shared one of the challenges of the machine language —
machine dependence, Having overcome the first challenge of machine language
io an extent, the assembly language is classified as middle-level language.
High level languages (HLL) are a complete deviation from the low level and
middle level languages. Firstly, they are similar to human languages and thus,
easier to learn and memorize. Secondly, they are not machine dependent. They
can target multiple platforms and processors without modifications. Examples of
* Hligh-Level Languages are Java, Python, C, C-+, FORTRAN, ete. High level
languages require language translators to convert the human-like source code to
machine code, which the computer understands. These translators can either be a
compiler or an interpreter.
Computer Languages
Coe)
Use’ 5&0" sto Use mnemonics to
create Instructions cereate Instructions
Similar to
human langugae
Ex Binary Language ‘Assembly Language a, porn et
. Figure 1: Classification of Programming Languages
Compilers and Interpreters
Compilers check the entire code to ensure it is error free before converting
everything to machine language. Interpreters however does its translation one line
ata time, Because of the approach to the translation, the interpreter is usually
faster than the compiler.
Software Development Life Cycle (SDLC)re ral steps and pro
The development of an efficient software takes i a le a
since software undergoes continuous jmprovements, aim Steps a
Sontinues. The SDLE comprises of the following steps.
problem
— This involves definition, input and oy
specification.
Gk Design — using tools Ii
prototyping tools,
Wik Codingimplementation — here the
ke algorithm, flow chart, pseudo code and 9
design is implemented in a ch
programming language.
i. Testing and debugging — here unit tests and integration tests are carrig,
out, Bugs are discovered and fixed. ‘The process of finding ad fixing by
in programming is called debugging.
\< Documentation and Deployment ~ User manuals and technical manuals ate
written, The program files and other data are packed together and deployed
for installation on user computer systems. '
Vi. Maintenance — after'the release of a version of the software, new features
may be needed or existing ones enhanced to meet market demands. This
ke the programmer back to the analysis step and running through the
Classification of Software
Apptaton
Sotserve and interface between the computer hardware and the user. The O!
be seen as the resource manager of the computer system since a . ; S can also
management tasks and job scheduling. Utility application are des mista balerch
- communication between peripheral devices and the operating s on ta enhance
of utility software are disk defragmenter and device drivers. be
Programming software are written to aid in the development of other software.
These are made up of language translators like compiles, interpreters and
assemblers which are sometimes packaged as Integrated Development
Environments (IDE). IDEs contain a text editor for typing source code, language
translator, debuggers and libraries of functions.
problems. They
Application software are developed to solve every day human
‘ic software are
ire classified as generic, professional or bespoke software. Gener
designed to solve general problems and serve a wide variety of users. Example is
the Microsoft office suit and some general graphics applications. Some software
are developed to meet the need of a particular profession. Such software are called
software. An example is accounting software or inventory
lesigned for a specific problem. Such
hhout significant modifications since
professional
application. Bespoke software are specially d
” software may not be used for another user wit
jt was tailor-made for a particular user in a particular scenario.Sys
INTRODUCTION TO PYTHON
OBJECTIVE
The objective of this exercise is to become familiar with the python IDE while intodutg
basic mathematics operation, variable types, and printing options,
BACKGROUND
Virtually all modern programming languages make us of an IDE, ot {integrated Develop
Environment, which allows the creation, editing, testing, and saving of programs and modules:
In python, the IDE is called IDLE (like many items in the language, this is a reference to th,
British comedy group Monty Python, and in this case, one ofits members, Eric idle)
Before opening IDLE, it is worth recalling that there are three basic types of simple varibig
in Python: integers (whole numbers, commonly used as an index), floats (that is numbers Wig
decimal point, AKA real numbers), and strings (collections of alphanumeric characters sug,
as names, sentences, or numbers that are not manipulated mathematically such asa part numby
or zip code). A legal variable name must start with a letter. It is then optionally followed by
some collection of letters, numerals and the underscores. It cannot contain any other characters
or spaces, and cannot be a reserved word (ic., a word with a special meaning in the language
such as a command or operator). In Python, variables may be ereated simply declaring then
and assigning a value to them. Examples include: 2,3 name= “Joe”
Sedu)
It is best to think of the equal sign as “gets”. Thats think of the first example as “the variable
a gets the floating point value 2.3” and the second as “the variable names gets the string Joe’,
An assignment command such as these literally reserves space in the computer's memory for
the variable and tags it with the variables name. then, it stores the appropriate value at ‘that
location for further use,
Procedure - Output Window
Open IDLE by selecting Python fiom the Start menu and then choosing the option to open
IDLE (Python GUI). DO NOT open the command line. A simple text window will open.
should have a white background with a text message at the top and immediately below tha, a
cursor prompt>>>
x oo
File Eat. Shel Debug Options Window Help
Python 3.13.0 (tags/¥3.13,0:60403a5, Oct 7 2024, 09:38:07) [MSC v.i941 64 bit
I] |aupeay1 on wina2
Pre theirs tommmctiner, ncseattar oct muscniee )" eat sate sciroemarton,
>>>
This window serves two functions. First, it can serve as a sort of scratch pad to try snippets of
code (shown in the steps below). Second, it can serve as the text output window for the large!
programs. Do not try to use this window for the creation of complete programs that you wist
to save. We shall use this window to create a few variables and perform some manipulations
into it. In similar manner, type in the following commands:
= 13
K=5.0
on them, Type the following and then hit the Enter key.
A=5
The >>> should reappear. This command defines a variable called a copies the integer Vall”
Y=13.0
6