In general, it will be in the form:
term: definition
code```
Syntax: the rules of a langauge
Syntax error: the misuse of a language that results in an error
for i range(5):
print(i)```
Comment: a piece of code that does not run. In Python, comments begin with the # symbol
Variable: a way to store a value
x = 10```
- "Store the value of z in the variable x", "
```python
z = x```
Type: the kind or category of a value. Every value has a type.
Assignment, assigning: the act of putting a value in a variable
x = 10```
Operator, operation: special symbols that carry out arithmetic or logical computation
1 + 3```
**Logical operator**: specifically for operators regarding boolean values
- "Use the `and` operator"
```python
True and False```
List/array: a type of value that contains an (ordered) sequence of other values
List index: the location of an element in a list
Indexing: the action of retrieving a single element from a list
x[5]```
- "retrieve the 0th element of a list"
```python
x[0]
Negative indexing: retrieving a single element using negative numbers
x[-1]```
List slice: a portion of a list (also a list)
Slicing: the action of retrieving a portion of a list
x[0:4]```
- "get the slice of x from 0 to 3, inclusive"
```python
x[0:4]```
Function: a piece of code that is used for repeating work. Functions are "called" or "invoked". A function takes 0 or more arguments and is only run when called. Functions "return" a value.
Argument/parameters: a value that is passed to a function when the function is called. Arguments are "passed" to functions and a function "takes" an argument
Conditional/Control flow: a way of changing the program behavior depending on a condition
If statement: A way of adding control flow to a program
Loop: A piece of code that runs itself repeatedly. Commonly used to run a piece of code over every value in a list. In this course, we will use for and while loops.