Chapter 1: Introduction to Hardware, Software, and Algorithms

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/20

flashcard set

Earn XP

Description and Tags

A set of question-and-answer flashcards covering key concepts from hardware, software, algorithms, Python, and Colab introduced in the lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

21 Terms

1
New cards

What is an algorithm?

A step-by-step description of how to solve a problem.

2
New cards

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.

3
New cards

What are the two main components of the CPU?

The Control Unit and the Arithmetic Logic Unit (ALU).

4
New cards

What does the Control Unit do?

Directs processor operation, manages resources, reads instructions, provides timing and control signals, and coordinates I/O.

5
New cards

What does the Arithmetic Logic Unit do?

Performs calculations and comparisons; it is the workhorse of the CPU.

6
New cards

What is primary storage?

Memory chips that store data while powered (volatile memory).

7
New cards

What is secondary storage?

Slower, cheaper, persistent storage where data remains without power.

8
New cards

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.

9
New cards

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.

10
New cards

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.

11
New cards

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.

12
New cards

What is pseudocode?

An informal description of an algorithm that sits between natural language and code and is easily translated into Python.

13
New cards

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.

14
New cards

What is an Integrated Development Environment (IDE)?

A software suite that includes tools like a code editor, interpreter, and debugger; examples include Google Colab.

15
New cards

What is the Python interpreter?

A program that reads and executes Python code.

16
New cards

What does the Python compiler do in the context of Python?

Converts Python source code to bytecode that runs on the Python Virtual Machine.

17
New cards

What is Python’s interactive mode?

Execute Python statements one at a time in a console for quick testing.

18
New cards

What does a typical first Python program look like?

A comment line followed by a print("Hello World!") statement.

19
New cards

What is the print() function in Python?

A function that outputs a value to the screen.

20
New cards

What is a syntax error in Python?

A violation of Python's language rules that prevents the program from running.

21
New cards

What is a runtime (logic) error?

The program runs but produces unintended results or may crash due to a logical error.