1/20
A set of question-and-answer flashcards covering key concepts from hardware, software, algorithms, Python, and Colab introduced in the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is an algorithm?
A step-by-step description of how to solve a problem.
What is a computer program?
A sequence of steps that tells a computer how to perform a task; consists of many primitive instructions and enables different tasks.
What are the two main components of the CPU?
The Control Unit and the Arithmetic Logic Unit (ALU).
What does the Control Unit do?
Directs processor operation, manages resources, reads instructions, provides timing and control signals, and coordinates I/O.
What does the Arithmetic Logic Unit do?
Performs calculations and comparisons; it is the workhorse of the CPU.
What is primary storage?
Memory chips that store data while powered (volatile memory).
What is secondary storage?
Slower, cheaper, persistent storage where data remains without power.
What is memory in the context of a computer?
Primary storage that holds data and programs for the CPU; typical size ranges from 4 GB to 32 GB.
What are the common memory size units and what do they mean?
Byte = 8 bits; KB = 1024 bytes; MB = 1,048,576 bytes; GB = 1,073,741,824 bytes.
How does a program execute on a computer?
The program is loaded into memory; the CPU fetches and executes instructions one by one and may interact with the user, modifying and writing data.
What is software?
A sequence of instructions and decisions implemented in a language and translated to a form that can be executed; examples include Word, games, OS, and drivers.
What is pseudocode?
An informal description of an algorithm that sits between natural language and code and is easily translated into Python.
Who designed Python and why?
Guido van Rossum, in the early 1990s, to create a language with simpler, cleaner syntax that is easy to learn and modify; it is interpreted.
What is an Integrated Development Environment (IDE)?
A software suite that includes tools like a code editor, interpreter, and debugger; examples include Google Colab.
What is the Python interpreter?
A program that reads and executes Python code.
What does the Python compiler do in the context of Python?
Converts Python source code to bytecode that runs on the Python Virtual Machine.
What is Python’s interactive mode?
Execute Python statements one at a time in a console for quick testing.
What does a typical first Python program look like?
A comment line followed by a print("Hello World!") statement.
What is the print() function in Python?
A function that outputs a value to the screen.
What is a syntax error in Python?
A violation of Python's language rules that prevents the program from running.
What is a runtime (logic) error?
The program runs but produces unintended results or may crash due to a logical error.