Create a “WordPress” account

--Originally published at TC101 – Peaz Cooper

Okay… Let’s start… this is very simple so there’s no need for a video tutorial.


WordPress is a free and open-source content management system (CMS) based on PHP and MySQL. WordPress is installed on a web server, which either is part of an Internet hosting service or is a network host itself; the first case may be on a service like WordPress.com, for example, and the second case is a computer running the software package WordPress.org. An example of the second case is a local computer configured to act as its own web server hosting WordPress for single-user testing or learning purposes. (Wikipedia)


1.- Go to wordpress.com

2.- Sign up in register

3.- Create an account with your personal data

4.- Send me some food

5.- Rearrange the information

6.- Diversify your topics

7.- Create a lot of blog posts

8.- Throw shade at other student’s blog posts


Partial II – Ranges in Python (and more lists)

--Originally published at TC101 – Peaz Cooper

Well well well! First of all! Ask yourself the following questions:

Do you know what’s a Python dictionary? Is it in English? Are tacos tacos if they don’t have any meat? Together we will learn the answers to these awesome and mind-blowing questions!


As in math, the range is the quantity of variables between to limits or specific points, while it generates a list of numbers it is used mostly for loops, and this one is  if we want to perform an action n number of times! (as far as I know). Well… as you may already know this is not my top topic… but here’s a useful video!


If you follow these steps you’ll be coding like a bawse in no time!!!

#PeazCooperOut #TC101


Part II – Creation and use of dictionary

--Originally published at TC101 – Peaz Cooper

Well well well! First of all! Ask yourself the following questions:

Do you know what’s a Python dictionary? Is it in English? Are tacos tacos if they don’t have any meat? Together we will learn the answers to these awesome and mind-blowing questions!


A dictiorany is mostly a way to store the data like a list (see my previous posts). The thing here is that instead of using just numbers to get the data you can also use almost anything.  We can use numbers to index into a list, meaning that the lists can be used with numbers- But let’s remember from our previous experiences that we can only use numbers to get items out of a lsit.

This video is very helpful! Check it out!!! IT has been approved by KhanAcademy and Richard Carrera (Tec and Dell’s specialist).


If you follow these steps you’ll be coding like a bawse in no time!!!

#PeazCooperOut #TC101


Part II – There are no STRINGS on me!

--Originally published at TC101 – Peaz Cooper

Well well well! First of all! Ask yourself the following questions:

How can I create a string? For what? Do I need a lamb first? Together we will learn the answers to these awesome and mind-blowing questions!


Strings are amongst the most popular types in Python. We can create them simply by enclosing characters in quotes. Python treats single quotes the same as double quotes. Creating strings is as simple as assigning a value to a variable.

var1 = 'Hello World!'
var2 = "Python Programming"

Python does not support a character type; these are treated as strings of length one, thus also considered a substring.

To access substrings, use the square brackets for slicing along with the index or indices to obtain your substring.

var1 = 'Hello World!'
var2 = "Python Programming"

print "var1[0]: ", var1[0]
print "var2[1:5]: ", var2[1:5]

You can “update” an existing string by (re)assigning a variable to another string. The new value can be related to its previous value or to a completely different string altogether.


If you follow these steps you’ll be coding like a bawse in no time!!!

#PeazCooperOut #TC101


Part II – Creation and use of Lists/Tuples

--Originally published at TC101 – Peaz Cooper

Well well well! First of all! Ask yourself the following questions:

Is it real that only god can create such a variety of organisms? Can we do the same with a use of lists? Have you seen Walter White? Together we will learn the answers to these awesome and mind-blowing questions!


Okay this is kinda cheating… but here’s a brief explanation from sthurlow that explains perfectly!

  • Lists are what they seem – a list of values. Each one of them is numbered, starting from zero – the first one is numbered zero, the second 1, the third 2, etc. You can remove values from the list, and add new values to the end. Example: Your many cats’ names.
  • Tuples are just like lists, but you can’t change their values. The values that you give it first up, are the values that you are stuck with for the rest of the program. Again, each value is numbered starting from zero, for easy reference. Example: the names of the months of the year.
  • Dictionaries are similar to what their name suggests – a dictionary. In a dictionary, you have an ‘index’ of words, and for each of them a definition. In python, the word is called a ‘key’, and the definition a ‘value’. The values in a dictionary aren’t numbered – tare similar to what their name suggests – a dictionary. In a dictionary, you have an ‘index’ of words, and for each of them a definition. In python, the word is called a ‘key’, and the definition a ‘value’. The values in a dictionary aren’t numbered – they aren’t in any specific order, either – the key does the same thing. You can add, remove, and modify the values in dictionaries. Example: telephone book.

So check out this page for information

Continue reading "Part II – Creation and use of Lists/Tuples"

Part II – Creation and use of strings

--Originally published at TC101 – Peaz Cooper

Well well well! First of all! Ask yourself the following questions:

What is a string? How can you create it? Am I Pinnochio? Together we will learn the answers to these awesome and mind-blowing questions!


We can create them simply by enclosing characters in quotes. Python treats single quotes the same as double quotes. Creating strings is as simple as assigning a value to a variable.

var1 = 'Hello World!'
var2 = "Python Programming"

Python does not support a character type; these are treated as strings of length one, thus also considered a substring.

To access substrings, use the square brackets for slicing along with the index or indices to obtain your substring.

#!/usr/bin/python

var1 = 'Hello World!'
var2 = "Python Programming"

print "var1[0]: ", var1[0]
print "var2[1:5]: ", var2[1:5]

(WIKI)

If you follow these steps you’ll be coding like a bawse in no time!!!

#PeazCooperOut #TC101


Part II – Recursive Functions

--Originally published at TC101 – Peaz Cooper

Well well well! First of all! Ask yourself the following questions:

Do you know what recursive functions? I like squirtle! Together we will learn the answers to these awesome and mind-blowing questions!


Recursion is a way of programming or coding a problem, in which a function calls itself one or more times in its body. Usually, it is returning the return value of this function call. If a function definition fulfills the condition of recursion, we call this function a recursive function.

The adjective “recursive” originates from the Latin verb “recurrere”, which means “to run back”. And this is what a recursive definition or a recursive function does: It is “running back” or returning to itself. Most people who have done some mathematics, computer science or read a book about programming will have encountered the factorial, which is defined in mathematical terms as

n! = n * (n-1)!, if n > 1 and f(1) = 1

Example:
4! = 4 * 3!
3! = 3 * 2!
2! = 2 * 1

Replacing the calculated values gives us the following expression
4! = 4 * 3 * 2 * 1

Generally, we can say: Recursion in computer science is a method where the solution to a problem is based on solving smaller instances of the same problem.The possible combinations quickly multiply out to unimaginably large numbers. Indeed, the repertoire of sentences is theoretically infinite, because the rules of language use a trick called recursion. A recursive rule allows a phrase to contain an example of itself, as in She thinks that he thinks that they think that he knows and so on, ad infinitum. And if the number of sentences is infinite, the number of possible thoughts and intentions is infinite too, because virtually every sentence expresses a

Continue reading "Part II – Recursive Functions"

Part II – You just gotta bel-ELIF!

--Originally published at TC101 – Peaz Cooper

Well well well! First of all! Ask yourself the following questions:

Do you know the difference between “if”-“elif”-“else” on python? Honey! Where’s my super suit? An where’s my grape juice at? Together we will learn the answers to these awesome and mind-blowing questions!


The “else” statement can be mixed with an “if”statement, since “else statement” contains the block of code that is executed only if the conditional expression in the “if” statements solves to values “0” or a “false” value.


The elif Statement

The elif statement allows you to check multiple expressions for TRUE and execute a block of code as soon as one of the conditions evaluates to TRUE.

Similar to the else, the elif statement is optional. However, unlike else, for which there can be at most one statement, there can be an arbitrary number of elif statements following an if.


If you follow these steps you’ll be coding like a bawse in no time!!!

#PeazCooperOut #TC101


Part II – Use of the Conditional “if”

--Originally published at TC101 – Peaz Cooper

Well well well! Second of all! Ask yourself the following questions:

Do you know how to use the conditional “if” in your code? Do you have a knee pain? Maybe some sore throat? Together we will learn the answers to these awesome and mind-blowing questions!


Our life is made by decisions we take day after day, and our code is not an exception! A decision on our program is used when there are a set of actions that depend on our variable’s value and some of these need more information on order to be functional. Thankfully Python has the “if” statement that helps us to make a decision way simpler on our awesome code

n = input("Integer? ") #Pick an integer.  And remember, if raw_input is not supported by your OS, use input()
n = int(n) #Defines n as the integer you chose. (Alternatively, you can define n yourself)
if n < 0: )
    print ("The absolute value of",n,"is",-n)
else:
    print ("The absolute value of",n,"is",n) 


Here is the output from the two times that Mike Steinberg this program:

Integer? -34
The absolute value of -34 is 34

Integer? 1
The absolute value of 1 is 1

What does the computer do when it sees this piece of code? First, it prompts the user for a number with the statement “n = raw_input("Integer? ")“. Next it reads the line “if n < 0:“. If n is less than zero Python runs the line “print "The absolute value of",n,"is",-n“. Otherwise python runs the line “print "The absolute value of",n,"is",n“.

More formally, Python looks at whether the expression n <

Continue reading "Part II – Use of the Conditional “if”"