Foundations of Python Programming: 1

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

object

Also known as a data object (or data value). The fundamental things that programs are designed to manipulate (or that programmers ask to do things for them).

semantic error

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

bug

An error in a program.

runtime error

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

boolean expression

An expression that is either true or false.

statement

An instruction that the Python interpreter can execute. So far we have only seen the assignment statement, but we will soon meet the import statement and the for statement.

codelens

An interactive environment that allows the user to control the step by step execution of a Python program.

python shell

An interactive user interface to the Python interpreter. The user of a Python shell types commands at the prompt (>>>), and presses the return key to send these commands immediately to the interpreter for processing.

byte code

An intermediate language between source code and object code. Many modern languages first compile source code into byte code and then interpret the byte code with a program called a virtual machine.

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.

modulus operator

An operator, denoted with a percent sign ( %), that works on integers and yields the remainder when one number is divided by another.

executable

Another name for object code that is ready to be executed.

formal language

Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are formal languages.

natural language

Any one of the languages that people speak that evolved naturally.

increment

Both as a noun and as a verb, increment means to increase by 1.

comment

Information in a program that is meant for human eyes and isn't read by the interpreter and has no effect on the program's execution.

logical operators

One of the operators that combines boolean expressions: and, or, and not.

operand

One of the values on which an operator operates.

object code

The output of the compiler after it translates the program.

debugging

The process of finding and removing any of the three kinds of programming errors: syntax error semantic error runtime error

rules of precedence

The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.

syntax

The structure of a program.

parse

To examine a program and analyze the syntactic structure.

interpret

To execute a program in a high-level language by translating it one line at a time.

initialization (of a variable)

To initialize a variable is to give it an initial value. Since in Python variables don't exist until they are assigned values, they are initialized when they are created. Not so in all programming languages.

evaluate

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

compile

To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.

prompt string

Used during interactive input to provide the use with hints as to what type of value to enter.

Floating-point numbers are stored internally in two parts:

a base and an exponent.

expression

a combination of operators and operands (variable and values) that represent a single result value. Expressions are evaluated to create the single result value.

boolean value

a data type that is either true or false.

Algorithm

a step-by-step list of instructions that if followed exactly will solve the problem under consideration.

exception

another name for a runtime error.

decrement

decrease by 1

shell mode

A mode of using Python where expressions can be typed and executed in the command prompt, and the results are shown immediately in the command terminal window. Shell mode is initiated by opening the terminal of your operating system and typing "python". Press enter and the Python Shell will appear. This is in contrast to source code. Also see the entry under Python shell.

variable name

A name given to a variable. Variable names in Python consist of a sequence of letters, and digits that begins with a letter. In best programming practice, variable names should be chosen so that they describe their use in the program, making the program self documenting.

variable

A name that refers to a value.

namespace

A naming system for making names unique, to avoid duplication and confusion. Within a namespace, no two names can be the same.

value

A number or string (or other things to be named later) that can be stored in a variable or computed in an expression.

literal

A number or string that is written directly in a program. Sometimes these are also referred to as literal values, or just values.

random number

A number that is generated in such a way as to exhibit statistical randomness.

pseudo-random number

A number that is not genuinely random but is instead created algorithmically.

reference diagram

A picture showing a variable with an arrow pointing to the value (object) that the variable refers to. See also state snapshot.

documentation

A place where you can go to get detailed information about aspects of your programming language.

deterministic

A process that is repeatable and predictable.

low-level language

A programming language that is designed to be easy for a computer to execute; also called machine language or assembly language.

high-level language

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

portability

A property of a program that can run on more than one kind of computer.

keyword

A reserved word that is used by the compiler to parse program; you cannot use keywords like if, def, and while as variable names.

program

A sequence of instructions that specifies to a computer actions and computations to be performed.

data type

A set of values. The type of a value determines how it can be used in expressions. So far, the types you have seen are: integers (int) floating-point numbers (float) strings (str).

operator

A special symbol that represents a simple computation like addition, multiplication, or string concatenation.

activecode

A unique interpreter environment that allows Python to be executed from within a web browser.

programming language

A vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks.

state snapshot

A graphical representation of a set of variables and the values to which they refer, taken at a particular instant during the program's execution.

assignment token

= is Python's assignment token, which should not be confused with the mathematical comparison operator using the same symbol.

boolean type

A Boolean value has a Python type 'bool'.

str

A Python data type that holds a string of characters.

int

A Python data type that holds positive and negative whole numbers.

float

A Python data type which stores floating-point numbers. When printed in the standard format, they look like decimal numbers.

standard library

A collection of modules that are part of the normal installation of Python.

module

A file containing definitions and statements intended to be imported by other programs by using the import statement (in python).

type conversion function

A function that can convert a data value from one type to another. ex: int()

random number generator

A function that will provide you with random numbers, usually between 0 and 1.

print function

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

token

one of the basic elements of the syntactic structure of a program; analogous to a word in a natural language.

source code

the instructions in a program, stored in a file, in a high level language before being compiled or interpreted.

semantics

the meaning of a program.

problem solving

the process of formulating a problem, finding a solution, and expressing a solution.


Ensembles d'études connexes

Chapter 16: recording your research results

View Set

CH 25: Acquired Conditions & Congenital Abnormalities in the Newborn

View Set

The Humanistic Tradition: Rome Empire

View Set

ThePoint Chapter 33 NCLEX Review Questions Maternity and Pediatric Nursing

View Set

Chapter 19: Documenting and Reporting

View Set

Certified Hacking Forensic Investigator (CHFI) - Exam Prep

View Set

Physics Final: Sounds Waves and Music

View Set

HRTM 450 FINAL- SOMANG plus more

View Set

Advanced Networking, Chapter 4 - Quiz - Study Guide

View Set