diff --git a/.vscode/settings.json b/.vscode/settings.json index fdda296..5ad8faa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,9 @@ { "cSpell.words": [ +<<<<<<< Updated upstream "adzyb", +======= +>>>>>>> Stashed changes "decrement", "iterable", "pythonic" diff --git a/docs/conditionals/README.md b/docs/conditionals/README.md index 6605b89..3f986e4 100644 --- a/docs/conditionals/README.md +++ b/docs/conditionals/README.md @@ -147,5 +147,9 @@ All logic inside a computer boils down to True or False logic. True is either re When considering your if statements, you need to consider how they will be evaluated. Consider this code fragment: +<<<<<<< Updated upstream {{ code_from_file("conditionals/example-5.py", 1, 40, execute=True) }} +======= +{{ code_from_file("conditionals/example-5.py", 1, 40, execute=True) }} +>>>>>>> Stashed changes diff --git a/docs/iteration/while-loops/README.md b/docs/iteration/while-loops/README.md index 4291b4e..37cac84 100644 --- a/docs/iteration/while-loops/README.md +++ b/docs/iteration/while-loops/README.md @@ -1,6 +1,5 @@ # While Loops (indefinite iteration) - Anytime you want to do anything more than once in a Python program, you should consider putting it inside a loop. There are two types of loops in python, a 'for' loop and a 'while' loop. Generally 'for' loops are used when you know the amount of times you want to repeat something. It doesn't have to be an exact integer value, it can also be anything easily calculable. 'While' loops are used when you aren't sure how many times you need to repeat something or you need to do something recursively. In python, all control statements use indentation to define blocks of grouped code. diff --git a/docs/values-and-types/README.md b/docs/values-and-types/README.md index e7fa5ef..8d60669 100644 --- a/docs/values-and-types/README.md +++ b/docs/values-and-types/README.md @@ -6,10 +6,7 @@ There are 4 basic types in python; Boolean, integer, floating point number and string. Booleans or "bools" are either true or false, a one or a zero, they are representative of the binary calculations that make computers work. Integers are any whole number and can be both positive and negative numbers, where as floating point numbers are anything with a decimal point in. A string is an interesting type as it also works like an iterable which we'll see more of later, but it stores a string of characters together. Every time we make a value that a computer needs to be able to reuse, we call that type a "variable". Let's look at some examples of how we use types and make variables: ## Basic Types: Creating your first variable -To create your first variable it's pretty easy, you just name it and then use the assignment operator to assign it to that name. This will create a sort of pet name, pseudonym, or alias for a location in memory where the object that contains the value is then stored. Anytime you use that pseudonym it'll refer to whatever is stored in that object again. It's easier to show you then it is to explain it. In the next few examples you'll see how to create and label a variable in python. The two things you need to keep in mind when creating a variable are; an appropriate name/label, and the type of variable you need to create. - -!!! Warning - Variables are the fundamentals of programming and are included everywhere, so make sure you feel comfortable with everything here before you move on to other sections. +To create your first variable it's pretty easy, you just name it and then use the assignment operator to assign it to that name. This will create a sort of pet name, pseudonym, or alias for a location in memory where the object that contains the value is then stored. Anytime you use that pseudonym it'll refer to whatever is stored in that object again. It's easier to show you then it is to explain it, so make sure you feel comfortable with everything here before you move on. In the next few examples you'll see how to create and label a variable in python. The two things you need to keep in mind when creating a variable are; an appropriate name/label, and the type of variable you need to create. ### Naming Conventions Variable names can start with a number, letter, or underscore, but not any other special character. [PEP8](https://www.python.org/dev/peps/pep-0008/) Python programming conventions say that variables should be named with all lower case letters, for longer variable names each word should be separated by underscores: