Tuesday, October 14, 2014

Frontend, Backend, where does Python fit?

In simple terms front-end is what you see; backend is how it works.

Front-end

The website is usually a mixture of HTML, CSS and Javascript, which are all controlled by the browser.

Back-end

The backend operation is the web application communicating with the server to make changes and store on a server. Languages like PHP, Ruby, and Python are used in this communication.


Monday, October 13, 2014

Built-In Python Modules

Math is an example of a built-in Python module.  If the math module is not imported first the math functions in Python will not work. See example below.


Creating and Importing Modules

A module can be used to save variables and methods. Modules can then be imported into a method. See example below.




Constructors

A constructor is a function that initializes immediately as soon as the objects is created. See example below.


Printing Strings


Update to Market Evaluation Program

An update to the Stock Market Evaluation Program that utilizes Classes and Objects to give some additional information in the form of Strings based on user inputs.


Saturday, October 4, 2014

Classes and Self

Self is used as temporary placeholder for the object. See two examples below.



Thursday, October 2, 2014

Object Oriented Programming

An object contains built in attributes. These attributes can be data and/or methods. Functions associated with an object are referred to as methods. 

Before an object can be created, a class must be created. A class is a blueprint for an object.
Many objects can refer to the same class.

See below for two examples of creating a class, and then creating an object. 


Tuples as Parameters


Creating Functions

A simple function that returns a sentence with the square of the inputted number.