Python Flashcards ionicons-v5-c

algorithm

A set of specific steps for solving a category of problems

comment

in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program

high-level language

A programming language like Python that is designed to be easy for humans to read and write.

print

A function used in a program or script that causes the Python interpreter to display a value on its output device.

runtime error

An error that does not occur until the program has started to execute but that prevents the program from continuing.

semantic error

An error in a program that makes it do something other than what the programmer intended.

semantic

the meaning of a program

syntax

The structure of a program

syntax error

An error in a program that makes it impossible to parse — and therefore impossible to interpret.

string

contains a string of letters

variable

name that refers to a value

assignment statement

gives value to a variable

statement

instruction that the Python interpreter can execute

operators

special tokens that represent computations like addition, multiplication and division

evaluate

To simplify an expression by performing the operations in order to yield a single value.

int

A Python data type that holds positive and negative whole numbers

float

A Python data type which stores floating-point numbers. Floating-point numbers are stored internally in two parts: a base and an exponent. When printed in the standard format, they look like decimal numbers

flow of execution

The order in which statements are executed during a program run.

function

A named sequence of statements that performs some useful operation. Functions may or may not take parameters and may or may not produce a result

local variable

A variable defined inside a function. A local variable can only be used inside its function. Parameters of a function are also a special kind of local variable.

boolean function

A function that returns a Boolean value. The only possible values of the bool type are False and True.

block

A group of consecutive statements with the same indentation.

boolean expression

An expression that is either true or false.

conditional statement

A statement that controls the flow of execution depending on some condition. In Python the keywords if, elif, and else are used for conditional statements.

conditional statement

One program structure within another, such as a conditional statement inside a branch of another conditional statement

dictionary

A collection of key/value pairs that maps from keys to values.

exception

Raised by the runtime system if something goes wrong while the program is running.

file

A named entity, usually stored on a hard drive, floppy disk, or CD-ROM, that contains a stream of characters.

format operator

The % operator takes a format string and a tuple of values and generates a string by inserting the data values into the format string at the appropriate locations.

sequence

A data type that is made up of elements organized linearly, with each element accessed by an integer index.

str

converts to a string

argument

a value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.

integer division

An operation that divides one integer by another and yields an integer. Integer division yields only the whole number of times that the numerator is divisible by the denominator and discards any remainder.

element

One of the values in a list (or other sequence). The bracket operator selects elements of a list.

module

A file containing definitions and statementsintended to be imported by other programs.

When will the following loop terminate?while keep_on_going != 999 :

When keep_on_going refers to a value not equal to 999