Please enable JavaScript to use CodeHS

Python Basics Glossary

Flashcards

Course:

Module:

Search:

interpreted language General

Translates and executes program code line by line into machine code.

compiled language General

Translates, or “compiles” the entire code into machine code and then runs the program, or sets aside to run later.

Low-Level Language General

A programming language, generally machine code or assembly language, that provides little or no abstraction from a computer's instruction set architecture

High-Level Language General

A programming language has a significant abstraction from the details of computer operation.

Loop General

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

Loop

For Loop Python

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

input() Python

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

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.

Escape Sequence General

Escape sequences are characters with special meanings.

Concatenation Python

Adding two strings together using the "+" operator.

methods of an object General

Defines what an object can do.

Boolean Python

A True or False value

Floating Point Numbers Python

Also called floats, floating point numbers represent real numbers and are written with a decimal point dividing the integer and fractional parts.

Integer Python

A positive or negative whole number.

String Python

A sequence of characters surrounded by quotation marks.

int(string) Python

Converts a string into an integer

str(number) Python

Converts number to text

float(string) Python

Converts a string into a float

Type Conversion Python

The process of converting the value of one data type (integer, string, float, etc.) to another data type is called type conversion.

Debugging General

Debugging is fixing a problem in your code.

Debugging

Mouse Event General

A mouse event is when the user does something with the mouse, like clicking or moving.

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

Comparison Operator Python

Used to make comparisons between values.

Infinite Loop General

A loop that has no way of stopping, and will keep looping forever.

While Loop Python

Lets us repeat code as long as something is true.

Break Python

Exits the current loop and resumes execution at the next statement.

Return Python

Exits a function, optionally passing back an expression to the caller. A `return` statement with no arguments is the same as `return None`.

String Indexing Python

Accessing certain characters in a string.

String Immutability Python

Strings cannot be mutated or changed.

String Slicing Python

Accessing specific chunks of a string.

count() Python

A method that counts occurrences of specific items in a list.

find() Python

Python method that returns the index at which the string is found in another string, returns -1 if not found.

strip() Python

Python method that returns a copy of the string you call it on, without any whitespace at the beginning or end.

split() Python

A Python method that returns a list of strings after breaking the given string by the specified separator

join() Python

The `join()` method takes all items in a collection and joins them into one string

Web Scraping General

Web Scraping is the extraction of data from a website.

List Python

A heterogenous, **mutable** data type that stores an ordered sequence of things.

List Indexing Python

Accessing certain elements in a list

append() Python

Add a particular item to the end of a list.

extend() Python

Takes a list as an argument and extends the current list with the list given as an argument.

remove() Python

removes the first occurrence of the element with the specified value.

sort() Python

sorts the list in ascending order by default.

reverse() Python

reverses the sorting order of the elements.

Pair Programming General

Pair programming is a collaborative programming practice where two programmers work together at one computer on the same piece of code.

File General

a digital container that holds information or data on a computer

Input Device JavaScript

A device used to give commands or send information to a computer

Output Device General

A device a computer uses to show or present information to a user

File I/O JavaScript

The process if reading data from a file or writing data to a file

open() Python

The action of establishing a connection between a file and a program to perform read or write operations on the file.

close() Python

The action of terminating the connection between a file and a program after completing read or write operations.

read() Python

A method used to read the contents of a file. It reads the entire file or a specified number of characters and returns them as a string.

Read mode Python

A file access mode (“r”) that allows reading the contents of a file but does not permit modifications.

readline() Python

A method used to read a single line from a file. It returns the line as a string, including the newline character at the end.

Newline character Python

A special character that represents the end of a line within a text file. In Python, the newline character is represented as \n.

readlines() JavaScript

A method used to read multiple lines from a file and return them as a list, where each line is represented as an element in the list.

File write JavaScript

The process of writing data or text to a file.

Overwrite General

The action of replacing the existing content of a file with new data.

Append General

The action of adding new data or text to the end of an existing file.

File mode General

A parameter used when opening a file to specify the intended operation (e.g., read, write, append).

File pointer General

A marker or reference that indicates the current position within a file.

`seek()` Python

A method used to move the file pointer to a specified location within a file.

File position General

The offset or index that represents the current position of the file pointer within a file.

Reading operations General

Actions performed to extract data or content from a file.

Writing operations General

Actions performed to modify or add data to a file.