Please enable JavaScript to use CodeHS

Intro Python Glossary

Flashcards

Course:

Module:

Search:

Class Python

A blueprint for creating objects that defines a type and its behavior.

Object Python

An instance of a class containing data and behavior.

Attribute Python

A variable bound to an instance of a class that describes the object.

__init__ method Python

A special method in Python classes used to initialize object attributes.

Instance Python

A single, unique object created from a class.

Constructor Python

Another term for the `__init__` method, which builds or initializes a new object.

Method Python

A function that an object can perform

Override Python

To provide a new version of a method that replaces the existing behavior

Instance Variable Java

A variable defined in a Class, for which each object of the class has its own copy.

Class Variable JavaScript

A variable shared by all instances of a class.

Attribute Python

A characteristic or property of an object

Inheritance Python

A mechanism where a new class (subclass) inherits attributes and methods from an existing class (superclass)

Superclass JavaScript

The parent class from which another class inherits

Subclass Python

The child class that inherits from another class

Getter Method Java

An instance method that allows the client to **get** the value of an instance variable on an object.

Setter Method Java

An instance method that allows the client to **set** the value of an instance variable on an object.

Hidden Attribute Python

An attribute that is private to the class and can only be accessed by code inside the class

Namespaces General

a namespace is the collection of variable names that exist at a certain point in your code.

Global namespace Python

The outermost scope where variables are accessible throughout the entire program

Class namespace Python

A scope containing variables and methods defined within a class

Object namespace Python

A scope containing instance variables specific to a particular object

Scope Python

The region of a program where a variable is accessible

Module Python

A file containing Python code (functions, variables, classes) that can be imported and reused in other programs

Import Python

A statement used to bring in code from a module so it can be used in the current program

Dot notation Python

The syntax used to access a method or attribute from an imported module like `math.sqrt()`

Define a Function JavaScript

Defining a function means to teach the computer a new command and explain what it should do when receiving that command.

Define a Function

Call a Function JavaScript

Calling a function actually gives the command, so the computer will run the code for that function.

Call a Function

Variable General

A symbol or container that holds a value.

variable

Parameters Python

Pieces of information you can give to functions when you define them. When the function is called the arguments are the data you pass into the function's parameters. Parameter is the variable in the declaration of the function. Argument is the actual value of this variable that gets passed to the function.

If Statement General

An if statement lets you ask a question to the program and only run code if the answer is true.

If Statement

If Else Statement General

Control structure that lets us run either one section of code or another depending on a test.

If Else Statement

Logical operator JavaScript

Used to make logical associations between boolean values

logical operator

Comparison operator General

Used to make comparisons between values.

comparison operator

Elif Python

A control flow tool used as a second condition check after an if statement. It is a contraction of else if.

Equilateral Triangle General

A triangle where all angles and side lengths are equal.

Right Triangle General

A triangle that includes one 90 degree angle.

Acute Triangle General

A triangle where all angles are less than 90 degrees.

Obtuse Triangle General

A triangle where one angle is greater than 90 degrees.

forward(a_number) Python

Command that lets you tell Tracy to move forward. In between the parentheses you need to put a number to tell Tracy how far to move forward.

left(angle) Python

turns Tracy left at a specified angle

right(angle) Python

turns Tracy right at a specified angle

speed (number 1-10) Python

determines how quickly Tracy will move through commands

Loop General

A loop is a way to repeat code in your program.

Loop

Indentation General

Indentation is the visual structure of how your code is laid out. It uses tabs to organize code into a hierarchy.

color("red") Python

Command to change Tracy’s color.

Function body Python

In Python functions, the function body is the indented block of code that comes after the `def my_function():` line. The function body is what will be executed when the function is called.

Comment Python

A message in your code that explains what is going on.

Break Down (Decompose) JavaScript

Breaking down (decomposing) your code is splitting it into more functions.

Break Down (Decompose)

Pseudocode General

Pseudocode is a brief explanation of code in plain English.

Pseudocode

Decomposition General

Decomposition is breaking your program into smaller parts.

Decomposition

Top Down Design JavaScript

Top down design is a method for breaking our program down into smaller parts.

Top Down Design

While Loop General

Lets us repeat code as long as something is true.

While Loop

backward(a_number) Python

Command that lets you tell Tracy to move backward. In between the parentheses you need to put a number to tell Tracy how far to move backward.

right(degrees) Python

Command that tells tracy to turn right and in between parentheses, how many degrees to turn right.

left(degrees) Python

Command that tells tracy to turn left and in between parentheses, how many degrees to turn left.

input() Python

A function that prints a prompt and retrieves text from the user.

Function General

A function is like a command that you get to invent and name. It allows us to break our program into smaller parts, making the program easier to understand.

Cybercrime General

Identity theft, stealing money, stealing private information, controlling private computers.

Moore's Law General

An observation that the processing speed of computers is doubling every year. This is *exponential* growth. Computers are getting smaller and faster at an exponential rate.

Computer Science General

The study of computational thinking, the thinking humans need to in order to describe a step by step process to a computer.

Karel General

Karel is a dog who listens to your commands.

Karel

Karel Documentation JavaScript

Documentation for all Karel Commands and Syntax.

karel documentation karel docs karel reference

Function body JavaScript

The part of a function that contains the commands

function body

Function Python

A function is like a command that you get to invent and name. It allows us to break our program into smaller parts, making the program easier to understand.

Function Body Python

In Python functions, the function body is the indented block of code that comes after the `def my_function():` line. The function body is what will be executed when the function is called.

Snake Case Python

`snake case` refers to the style of writing in which each space is replaced by an underscore `_` character and the first letter of each word is lowercase.

Precondition JavaScript

Assumptions we make about what must be true before the function is called.

Precondition

Postcondition JavaScript

What should be true after the function is called

Postcondition

Abstraction General

Managing complexity by "abstracting away" information and detail, in order to focus on the relevant concepts.

Procedural Abstraction Java

The ability to use methods and programs that we do not fully understand, or are unable to write.

SuperKarel General

SuperKarel is like Karel but already knows how to turnRight() and turnAround()

SuperKarel

Application Programming Interfaces Java

APIs and libraries simplify complex programming tasks by providing sets of clearly defined methods of communication among various computing components.

documentation General

Written instructions detailing the functions, methods, and variables available and how to use them.

For Loop Python

A for loop lets us repeat code a **fixed number of times.**

Condition General

A condition is code that you put inside an if statement or while-loop.

Condition

if statement Python

Executes code only if condition is true

While Loop Python

Lets us repeat code as long as something is true.

Control Structure General

A control structure lets us change the flow of the code.

Control Structure loops if statements

Bug General

A bug is a problem in your code.

Bug

Debugging General

Debugging is fixing a problem in your code.

Debugging

Algorithm General

An algorithm is a set of steps or rules to follow to solve a particular problem.

algorithm, process

Sequencing General

Sequencing, or sequential execution, is step by step execution of instructions in the order they are given.

Iteration General

Repetition of instructions a specified number of times, or until a condition is met.

Selection General

Using a condition to determine which part of an algorithm is executed.

Ultra Karel JavaScript

Ultra Karel is the same as Super Karel, except Ultra Karel has the ability to paint the grid world!

For Loop JavaScript

A for loop lets us repeat code a **fixed number of times**.

For Loop

Comment JavaScript

A message in your code that explains what is going on.

Comment

Function JavaScript

A function is a way to teach Karel a new word.

Function