-
Python: 14 String Formatting
There are a lot of different ways to format and display text in Python. You can find a lot of excellent reference materials on W3 […]
-
Python: 13 Iteration – Loops – For
A for loop is used to iterate over a known number of items or a list. It is used when you know how many times […]
-
Python: 12 Iteration – Nested Loops
Nested loops are loops inside other loops. Note that the outer loop (first_word) is run first and then the code block encounters the second inner […]
-
Python: 11 Iteration – Loops – While
Iteration is the programming concept of repeating or looping sections of code. In Python there are two main types of loops while and for. The […]
-
Python: 10 Conditions – elif Statement for If Statements
The elif statement is short for else if. This is used for giving multiple options with an if statement. In the example above the age […]
-
Python: 9 Conditions – If Else Statements
If else statements allow for a program to select the code to run based on the outcome of a true / false condition. Look on […]
-
Python: 08 Conditional and Logical Operators
Conditional and logical operators are used to make statements that can be evaluated (worked out) to be True or False. True and False are keywords […]
-
Python: 7 Lists
A list is a collection that is ordered and has changeable content. There are other data collection methods in python such as: List is a collection […]
-
Python: 6 Getting User Input
Getting input is key to making an interactive program. User input is the main way of handling this. In Python there is a function called […]
-
Python: 05 Numbers and Operators ( + – / * )
Numbers work as you would expect. Note that 2 and 2.0 are considered different types. 2 is an integer and 2.0 of a double. You […]