2. Objectives
Problem Solving and Programming With Python
To introduce programming through Visual
programming tool – Scratch.
To teach problem solving through Flow charting
tool – Raptor.
To elucidate problem solving through python
programming language.
3. Objectives
Problem Solving and Programming With Python
To introduce function-oriented programming
paradigm through python.
To train in development of solutions using modular
concepts.
To teach practical Pythonic solution patterns.
4. Introduction
Problem Solving and Programming With Python
Introduction to Programming
Why Programming ?
Programming for Everybody
5. Introduction
Problem Solving and Programming With Python
Any Prerequisites ?
Where to start?
Why do we have so many languages?
6. Introduction
Problem Solving and Programming With Python
How to go about programming?
Why to learn programming?
What is programming?
How to give instructions ?
7. 7
What Is a Computer?
Computer
Performs computations and makes logical decisions
Millions / billions times faster than human beings
Computer programs
Sets of instructions by which a computer processes
data
Hardware
Physical devices of computer system
Software
Programs that run on computers
Problem Solving and Programming With Python
8. The boot process
The process by which a machine comes up from
rest state to the state that is usable is known as
booting
When the power is turned on
The CPU runs the BIOS (Basic Input / Output
System)
Usually located on a chip on the motherboard
Runs POST (Power On Self Test) of various hardware
components
Loads the boot sector program
8
Problem Solving and Programming With Python
9. Information storage
1 bit
8 bits
16 bits
32 bits
64 bits
• bit (1 or 0)
• byte (octet) (28)
• word (216)
• double (232)
• long double (264)
Encoding information on a fixed element of length n with a base b
gives bn non-redundant possibilities
Problem Solving and Programming With Python
10. Information coding
Binary
0 or 1
Octal
0-7
Hexadecimal
0-9+A-F
Decimal
0-9
Problem Solving and Programming With Python
12. Display
Screen pixel or dots
Color coding: 32 bits
1 pixel = 3 bytes of color (RGB)+1 byte alpha channel (transparency)
1600x1200x4bytes=7.5 Mb!
Problem Solving and Programming With Python
13. Storage Devices
Hard Disk Drive: used to store data inside of the computer.
Magnetic platter that holds a large amount of information in
a form the computer can understand.
Floppy Disk: flat circles of iron oxide-coated plastic
enclosed in a hard plastic case.
Most are 3 ½ inches and have a capacity to hold 1.44 MB
or more of data.
CD ROM Drive: a compact disk that reads only memory.
CD-RW: a device that allows you to read and write to a
compact disk
Problem Solving and Programming With Python
14. Storage Devices (Con.)
Internal Storage:
Allows you to store
information inside of the
computer
Hard Drive:
Allows the fastest access
to information
RAM (Random Access
Memory) – temporary
ROM (Read Only
Memory) -
long-term memory
External Storage:
Allows you to use devices to
store information outside
of the computer
Floppy Disks
CD-ROMs (Compact Disc
Read Only Memory)
CD-RW (Compact Disc
(Read and Write)
DVDs (Digital Video Disc)
USB/Jump Drives
Problem Solving and Programming With Python
15. Which Storage Device Holds
the Most Information?
FLOPPY DISKS
1.44 MB
CD-ROM DISC
640 MB
DVD DISC
17 GB
HARD DRIVES
80 and above GB
Problem Solving and Programming With Python
16. DVD
DVD ROM
Digital Video Disk which is read only.
DVD-R
Digital Video Disk which can be written to one
time. It then becomes read only.
DVD-RW
Digital Video Disk which can be rewritten to.
Problem Solving and Programming With Python
18. Flash or jump Drives
External storage devices that can be used
like a external hard drive.
They have the capability to be saved to,
deleted from, and files can be renamed
just like with a normal hard drive.
Problem Solving and Programming With Python