Table of Operator Order

*Quick but important post Below is a list of the order that one should follow when looking at Python’s Operators. The list goes from the first to last precedence **                                                   […]

Read More Table of Operator Order

Operator Order

“Operator order” is just a fancy phrase I coined to describe how, similar to mathematical equations, there is a specific precedence when evaluating code. In maths there is a concept called BODMAS (brackets, orders, divide, multiplication, addition, subtraction). This concept states that in a mathematical equation, all equations must be carried out in the order of BODMAS; […]

Read More Operator Order

Boolean Conditions

A quick remainder of the definition of boolean; a condition that evaluates to true or false. Similar to previous posts, these conditions can be made more complexly adding operators such as “and”, “or” and “not”. The “and” operator This operator combines 2 arguments and evaluates as to true only if both of the statements are […]

Read More Boolean Conditions

Elif Statements

*Quick Post An Elif statement stands for an else if statement. The elif statements are typically used between the if and else statements. So if an if statement evaluates to be false then the elif will then be evaluated. If the elif statement then proceeds to be false then the else statement will be evaluated. […]

Read More Elif Statements

Else Statements

The else statement is the counterpart to the if statement. The else statement contains the code when the if statements evaluates to false. In simpler terms, when the condition for the if statement does not ring true then the code of the else statement is then interpreted. *Similar to the if statements, the code for […]

Read More Else Statements

If Statements

If statements can be used if you want to run a code that follows a certain condition, in simpler terms a code will (or will not) run IF it follows certain conditions. When a condition evaluates to true then the code can be interpreted however when the condition no longer evaluates to being true then the […]

Read More If Statements

Booleans + Comparisons

Booleans are another type of operation. The term is not particularly definitive of its function however, booleans are operations that represent values for true or false. They are used for comparing values and seeing if the comparison is true or false. This term is most easily explained through examples; [Console] >>>boolean = True ===== [Interpreter] […]

Read More Booleans + Comparisons

In Place Operators

*Quick Post An in place operator is basically a method of shortening some operators. For example rather than writing out the operation for “x = x + 3” you can just write the operator “x += 3” – both are the same and both will produce the same result. The same kind of operation can […]

Read More In Place Operators

Variable Names

When it comes to writing names for variables, there are certain conditions that are suitable. This means that only certain characters are allowed for the name of variables, these characters being letters, numbers, and underscores. In addition, variable names can not start with a number and can not have spaces between each word otherwise the […]

Read More Variable Names

Variables

The technical term used to define a variable is: “a placeholder for texts and numbers that is used to store a value”. If you’re like me then that made no real comprehensive sense. So in my own words, a variable is something (whether it be a letter or a word or phrase) that you can […]

Read More Variables