Object oriented programming  means that you can store information into objects, defined at one point, and then use those objects at another point.


Four types of objects:
String = text
Integer = non decimal number
Float = decimal
Boolean = true/false

Variables in Python simply point to objects and are not the objects themselves. Though it is much easier to use them interchangeably, keep this fact in mind.

When pointing to an object, all you have to do is give it a name. Keep in mind that there are reserved words within the python library. Here is a list: https://www.tutorialspoint.com/What-are-Reserved-Keywords-in-Python

You cannot name a variable "pass", for example. So you make up an unreserved name, something that you can identify easily later and set it to equal one of those 4 basic types of objects like so:

	x = "ten"
	x = 10
	x = 10.0
	x = True

If you were to use x in anyway on the fifth line in the above program, it would be as a boolean object because that was the last definition in the program. Remember, line by line is how python is interpreted. 

	x = "ten"
	print(x)
	x = 10
	print(x)
	x = 10.0
	print(x)
	x = True
	print(x)

Try the above example in another cmd window by running the example code like so: python obj_op_ex1.py
You will see that it prints the object type that was pointed to in the line above.

Now, let's talk about operators.
Plus, subtract, multiply, divide.
+
-
*
/

This time we will need two variables to operate on:

	x = 5
	y = 10
	print(x + y)
	print(x - y)
	print(x * y)
	print(x / y)

Try the above code in a second CMD window by typing:		python obj_op_ex2.py

Lastly, we will combine two different types of objects.
	
	x = 5
	y = "ten"
	print(str(x) + y)
	print(len(y))
	print(x + len(y))

Here x is an integer but y is a string. The only way to combine the two is to convert one or the other using standard-library functions:   
int()    str()    len()
On the third line, we are converting the integer, x, into a string so that 5 becomes "5" and then we concatenate(combine) the converted x with y using the + operator.
On the fourth line it prints the length of the string, y, as an integer. 
On the fifth line, because converting a string into an integer is much more complicated when doing it dynamically, that is, not just redefining y to equal 10 on the next line, but interpreting the string for a combination of letters that spell out a number and then converting to that integer, we just get the length of the string using len()
which produces an integer that we can then concatenate(combine) with x. 

Try the above code with:  py obj_op_ex3.py
	