CSC1001: Introduction to Computer Science - Programming Methodology

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/44

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering computer architecture, number representation, Python basics, flow control, functions, string methods, file handling, and core data collections (lists, dictionaries, and tuples).

45 Terms

1
New cards
<p>Von Neumann Architecture</p>

Von Neumann Architecture

A theoretical computer architecture proposed by John Von Neumann that outlines the modern computer structure consisting of a Central Processing Unit (containing a Control Unit and an Arithmetic/Logic Unit), a Memory Unit, Input Devices, and Output Devices.

2
New cards

Central Processing Unit (CPU)

The primary hardware component that executes instructions and coordinates computation within a computer, containing both a Control Unit (CU) and an Arithmetic/Logic Unit (ALU).

3
New cards

Control Unit (CU)

A sub-unit of the CPU responsible for fetching commands and instructions from memory.

4
New cards

Arithmetic/Logic Unit (ALU)

A sub-unit of the CPU containing electrical circuits and adders that execute commands and perform arithmetic and logic calculations following binary rules.

5
New cards

Main Memory (RAM)

Fast, volatile primary internal memory that temporarily holds actively running programs and their immediate data, losing its contents when electrical power is lost.

6
New cards

Secondary Storage

Persistent, non-volatile storage hardware (such as hard disk drives [HDDs] and solid-state drives [SSDs]) that retains files and installed programs even when the power is turned off.

7
New cards

Positional Notation

A method of representing numbers using a base and a fixed set of symbols where each digit represents a positional value multiplied by a base weight (N=∑ai×baseiN = \sum a_i \times \text{base}^i).

8
New cards

Assembler

A utility program that converts low-level assembly language code, which has a direct one-to-one correspondence with architecture-specific machine instructions, into executable binary machine code.

9
New cards

Operating System (OS)

A low-level system program that provides fundamental services to manage computer activities, allocate system resources, monitor processes, and schedule operations (e.g., Windows, macOS, Linux, iOS, Android).

10
New cards

Logic-Inspired Approach to Intelligence

A computing paradigm emphasizing that the essence of intelligence is reasoning, accomplished by using symbolic rules to manipulate symbolic expressions, prioritizing knowledge representation over learning.

11
New cards

Biologically-Inspired Approach to Intelligence

A computing paradigm emphasizing that the essence of intelligence is learning connection strengths within a neural network, prioritizing understanding learning mechanisms before reasoning.

12
New cards

Compiler

A program that translates an entire program written in a source programming language into a target language or permanent machine/object code file before execution.

13
New cards

Interpreter

A program that translates and executes source code instructions on the fly during runtime line-by-line without pre-compiling into permanent machine code.

<p>A program that translates and executes source code instructions on the fly during runtime line-by-line without pre-compiling into permanent machine code.</p>
14
New cards

Bytecode

An intermediate, optimized instruction set generated by compilers like CPython that is executed on the fly by an internal virtual machine rather than compiling directly to native machine instructions.

15
New cards

Variable

A named location in memory determined by programmers that stores data which can later be retrieved and modified during program execution.

16
New cards

Reserved Words

Predefined words in Python syntax (such as def, if, else, while, for, in, try, except, return, True, False, None) that carry dedicated syntactic meanings and cannot be used as variable names.

17
New cards

Floor Division (//)

An arithmetic operator that divides two operands and rounds the mathematical quotient down to the nearest integer (for example, 143//25143 // 25 yields 55, while 143.4//25143.4 // 25 yields 5.05.0).

18
New cards

divmod()

A built-in Python function that takes two numbers and returns a tuple containing their quotient from floor division and their remainder (quotient,remainder\text{quotient}, \text{remainder}).

19
New cards

Simultaneous Assignment

A syntax pattern allowing multiple variables to be assigned values at the same time in a single statement, such as swapping variables via c,o=o,cc, o = o, c.

20
New cards

Augmented Assignment

A shortcut assignment syntax combining a binary operation with variable reassignment, having the general structure = (e.g., x+=7x \mathrel{+}= 7 is equivalent to x=x+7x = x + 7).

21
New cards

eval()

A built-in Python function that accepts a string argument, parses it, and executes it dynamically as a Python expression, returning the evaluated outcome.

22
New cards
<p>George Boole</p>

George Boole

English mathematician (1815–1864) who invented mathematical logic and made significant contributions to differential and difference equations, establishing the foundations of Boolean logic.

23
New cards

Boolean Type

A built-in Python data type consisting strictly of two logical values: True and False. Numeric 00 and empty sequences evaluate to False, while non-zero numbers evaluate to True.

24
New cards

Comparison Operators

Operators (including ====, !=!=, <<, <=<=, >>, and >=>=) that evaluate expressions to produce a True or False outcome without altering the operands' values.

25
New cards

Indentation

Leading whitespace used in Python to define code block structures and scope, increased after a colon (:) following statements such as if, for, while, or def, and decreased to terminate a block.

26
New cards

try / except Structure

An error-handling control flow structure where potentially error-prone code is placed within the try block; if an error occurs, execution jumps safely into the except block without crashing the program.

27
New cards

Indefinite Loop

A loop constructed with a while statement that executes repeatedly as long as a logical condition evaluates to True, running an unpredictable number of times until the condition becomes False.

28
New cards

Definite Loop

A loop constructed with a for statement that iterates explicitly through all members of an ordered sequence or set a predictable, predetermined number of times.

29
New cards

break Statement

A loop control statement that immediately terminates the active loop and jumps execution directly to the statement following the loop body.

30
New cards

continue Statement

A loop control statement that terminates the current iteration immediately and jumps directly to the beginning of the next iteration.

31
New cards

is Operator

A logical identity operator that tests whether two variables point to the exact same object in memory, representing a stronger condition than equality (====).

32
New cards

Function

A named, reusable block of code defined using the def keyword that accepts input arguments, executes instructions, and optionally passes back a result using a return statement.

33
New cards

Parameter vs Argument

A parameter is a variable identifier listed in the function definition header that acts as a handle; an argument is the real value passed to the function when it is invoked.

34
New cards

Fruitful Function

A function that computes a result and uses an explicit return statement to pass that calculated value back to the caller expression.

35
New cards

Local Variable vs Global Variable

A local variable is defined inside a function and can only be accessed within that function's scope; a global variable is defined outside all functions and can be read across the program, or modified inside functions using the global keyword.

36
New cards

Immutable Object

A data type whose contents cannot be modified in-place after instantiation (such as Python strings and tuples); any modification requires generating an entirely new object.

37
New cards

Mutable Object

A data type whose contents and internal elements can be modified in place without changing its identity in memory (such as Python lists and dictionaries).

38
New cards

String Slicing

Extracting a subset of a string using the slice syntax s[start:stop:step], which includes the character at start up to, but not including, the character at stop.

39
New cards

File Handle

A file object returned by the open() function that acts as a pointer and interface to perform reading, writing, or seeking operations on persistent storage files.

40
New cards

Newline Character (\n)

A special single character used in text files and strings to mark the termination of one line and the beginning of another.

41
New cards

List

A mutable, ordered sequence of items surrounded by square brackets ([]) where elements are indexed positionally beginning at index 00.

<p>A mutable, ordered sequence of items surrounded by square brackets ([]) where elements are indexed positionally beginning at index $$0$$.</p>
42
New cards

Dictionary

A mutable, unordered collection of key-value pairs surrounded by curly braces ({}) that allows fast retrieval of values using unique lookup keys rather than numeric indices.

43
New cards

get() Method (Dictionary)

A dictionary method that takes a lookup key and a fallback default value, returning the key's value if present or the default value if the key does not exist, avoiding a KeyError.

44
New cards

Tuple

An immutable ordered sequence of values enclosed in parentheses (()) that is indexed positionally from 00 and offers greater memory efficiency and speed than a list.

45
New cards

Double Split Pattern

A string-parsing pattern where split() is first called on a line of text to isolate a specific token, and split() is called again on that isolated piece with a different delimiter to extract desired data.