What is a program?
A set of instructions that a computer follows to perform a task; commonly referred to as software
Who is a programmer (software developer)
A person who designs, creates, and tests computer programs
What is hardware?
The physical devices that make up a computer, such as CPU, memory, storage, input, and output devices
What is the CPU?
The central processing unit; the part of the computer that runs programs. It executes instructions and is often built as a microprocessor chip
What is main memory (RAM)?
Volatile memory where programs and data are stored while running. Contents are erased when the computer is off
What is secondary storage?
Long-term storage for programs and data. Examples: disk drives, solid state drives, and flash memory
Give examples of input devices.
Keyboard, mouse, touchscreen, scanner, camera
Give examples of output devices.
Monitor, printer, USB drive (when data is saved to it)
What are the two main categories of software?
Application software (e.g., word processors, browsers) and system software (OS, utilities, development tools)
How is data stored in a computer?
As sequences of 0s and 1s (binary). A byte stores one character/number and is made up of 8 bits
What is the binary numbering system?
A system that uses only two values (0 and 1). Each position has a value of 2^(j-1)
What coding scheme represents characters as numbers?
ASCII (128 characters) and Unicode (supports many languages, compatible with ASCII)
How are negative and real numbers stored?
Negatives use two’s complement; real numbers use floating-point notation
What is the fetch-decode-execute cycle?
A: CPU operation cycle:
Fetch instruction from memory
Decode instruction
Execute operation
Why don’t programmers write in machine language?
It’s impractical; assembly and high-level languages are easier to read and use
What are keywords in programming?
Predefined words with specific meaning in a language (e.g., if, while)
What is a compiler?
A program that translates source code into a machine language file that can be executed later
What is an interpreter?
A program that translates and executes source code line by line (used by Python)
What are the two Python interpreter modes?
Interactive mode (one line at a time) and script mode (saved .py file run as a program)
What is IDLE?
Python’s Integrated Development and Learning Environment; includes editor and interactive shell