Introduction To Computers and Programming - Chapter1
Introduction To Computers and Programming - Chapter1
Introduction To Computers and Programming - Chapter1
Programming
Hong Sun
COSC 1436 Spring 2017
Jan 23 , 2017
Introduction
• What is a program
– Software: Controls everything the computer does
• What is hardware
– The physical devices that a computer is made of are referred to as hardware
• Five major components:
• CPU – the central processing unit
– Microprocessors; the part of a computer that actually runs programs.
• Main memory
– Random-access memory(RAM) - Computer’s work area.
• Secondary storage devices
– A type of memory that can hold data for long periods of time.
• Input devices
– Any data the computer collets from people and from other devices The component that collects
data and sends it to the computer is called input device.
• Output devices
– Any data the computer produces for people or for other devices. The component that produces
output data is called output devices.
How Computers Store Data
• All data that is stored in a computer is
converted to sequences of 0s and 1s
– Bytes – memory is divided into tiny storage
locations
– Bits – binary digit
– Store numbers, Characters….images
1 1 1 1 1 1 0 0, 0 1 0 1 1 1 1 1
How Computers Store Data
(the values of binary digits as power of
2)
How Computers Store Data
• Interactive Mode
• Script Mode
• IDLE Programming Environment
• The Python Key Words
• p17
Lab exercise and Assignment
• Installing Python on your computer
• Book for download
http://file.allitebooks.com/20151103/Starting%20Out%20with%20Pyt
hon,%203rd%20edition.pdf
• Reading Assignments:
• Review Questions
– p24 –p27
– Exercises 1-6
P28 – 29