Basic Programming Flashcards
Not following the
rules.
Syntax Error
is a mistake or an action that is incorrect—
also known as a bug in the program.
Error
is an interpreted, object-oriented, high-level programming language with dynamic semantics.
Python
Consists of structures, features, and opinions
about how problems should be solved.
Paradigm
◦ Issues found during
execution.
Run-time Error
The process of breaking a complex problem into parts that are easier to conceive, understand, program, and
maintain—like the Divide-and-Conquer strategy.
Decomposition
◦ Incorrect operation.
◦ Inaccurate results.
Semantic Error
Derived from the imperative paradigm, but
groups the instructions into procedures—
involves concepts such as modularity,
cohesion, and coupling.
- It is a style of programming with strong emphasis on grouping common steps into individual but reusable procedures—better known as functions.
Procedural Paradigm
Are functions that require subsequent calls to supply its corresponding arguments or values.
User-defined functions with Parameters
It is basically putting instructions and data into the RAM for the CPU/GPU to process it one after another.
Programming
- A programming paradigm with detailed and ordered instructions. It is concerned more on how to do things.
- Abstractions are based the classical computers or the Von Neumann architecture: control structures,
functions, classes.
Imperative Paradigm
Are reusable block of codes to process data, which are written by a programmer.
User-defined Functions
It is temporary storage of instructions and data.
Memory
Are special words in Python which should not be used as identifiers to variables, functions, etc.
Keywords
Helps a computer classify and allow operations on a data.
Data Type
It starts with a HASH (#) symbol.
# DO NOT affect the program.
# are used as:
# - guide for the programmers
# - testing purposes
Comment
A memory location, or simply a container where a specific data is stored.
Variable
Any whole number, such as: headcount, number of cells, number of tools, etc.
Integer
PYTHON STANDARD DATA TYPES
Used to signify the absence of value.
None type
PYTHON STANDARD DATA TYPES
A value that is either True or False.
Boolean
PYTHON STANDARD DATA TYPES
A sequence of characters, such as: full name, favorite color, inspiring quotes, contents of a blog post, etc.
String
PYTHON STANDARD DATA TYPES
A subset of real number with fixed-precision, such as: length, temperature, percentage, etc.
Float
z = x * y
Multiplication
PYTHON STANDARD DATA TYPES
A way to store multiple values in a single variable.
List
z = x + y
Addition
z = x // y
Floor division
z = x / y
Division
z = x % y
Remainder
z = x - y
Subtraction
z = x ** y
Exponent
PYTHON STANDARD DATA TYPES
An ordered collection key-value pairs.
Dictionary
z = -x
Negation
It allow a program to repetitively execute a code until a stopping mechanism ends it.
Looping and control Statement
It allows a program to test conditions and execute instructions only when the condition is True.
Conditional Statement
A way to control or override the program execution.
Control Statement
It executes a block of code
for each iteration over a sequence.
For Loop
A line was indented incorrectly.
Indentation Error
The program is performing an inappropriate operation.
Type Error
The variable used does not exist in the program.
Name Error
It repeatedly executes a block of code
while the specified condition is still True.
While Loop
The module name is misspelled or not existing.
ModuleNotFoundError
A virtual container containing all known identifiers.
Namespace
It is a feature that enables testing of a block of code and handles the error when encountered at run-time.
Try-Except Clause
A program in text form.
- is any valid program written in any
programming language, such as Python.
Source code
An error that occurs during runtime, but can be handled, so that the program can continue running.
Exceptions
The program uses an unknown attribute.
Attribute Error
The key does not exist in a dictionary.
Key Error
The program has the right type, but with an inappropriate value.
Value Error
The index is out of range for a sequence or list.
Index Error
An operation is performed to an unexpected and inappropriate type.
Type Error
The program attempts to divide by zero.
ZeroDivisionError
The Python file to be executed in command line.
Main Program
A folder containing __init__.py file.
- is a folder containing a set of common
Python modules or programs.
Package
Any Python file are considered as a module.
Module
A folder containing related packages.
- A software is a bundle of multiple files,
programs, packages, and libraries that makes it whole.
Library