Advanced Search
Search Results
16 total results found
Python Intro
Why Python There are many languages to choose from, so why this one? To answer that question you should first consider what type of development you plan to use it for and consider its benefits and drawbacks. Python is an interpreted language which means i...
Comments
Utilizing comments throughout your code not only help keep your thoughts together but they also help the next developer understand what you are doing. Their use should be quick and to the point but descriptive enough to be understood by someone who has never...
Variables
Variables in Python are dynamically typed. So what exactly does this mean? In other languages you would first define a variable and assign it a type. This type may be an integer, double, float, or string. In Python you can define a variable name and im...
Operators
Operators perform actions or evaluate variables. Arithmetic Operators + Addition x + y - Subtraction x - y * Multiplication x * y / Division x / y % Modulus x % y ** Exponentiation x ** y // Floor Division x // y  Assignment Operators...
Flow Control
Controlling your application with these techniques enable full control of how your application behaves. They flex the power of conditional operators.  if.. elif.. else.. this = true that = false if this == true: print('this is true') elif that =...
Functions
Functions are used to compartmentalize code into smaller chunks that you can reuse throughout your code. Ideally, you would break your code into pieces with logical, repeatable steps. For instance, you would not place your entire program into one function ...
Lists
A list is a great way to store related data in one place. The order of the items contained within are not sorted unless explicitly done in the code. Various methods are employed to manipulate and iterate over this data. # Define a list like this cars = [...
Tuples
Tuples are very similar to lists. The major difference, tuples are immutable. While lists have many functions to change the data contained within them, tuples prevent this action and will raise an exception if it is attempted.  # Tuple example someV...
Sets
Sets are unordered collections of items that contain no duplicates. If a duplicate entry is attempted, the entry is ignored. # Pyhon Sets are unordered, unchageable, and do not allow duplicates # How sets are defined myset = {"apple", "banana", "cherry"...
Dictionaries
Dictionaries are likely the most used data type. These store data in "key, value" pairs and like other data types, nested values of other types are also allowed. # Use dictionaries to store related values of which you wish to lookup later person = {"name...
Modules
Modules are simply ".py" files that contain python definitions and functions. Those functions can be later imported by other scripts. They have their own private symbol table so names of the functions won't clash with your main script. This could be a fil...
Packages
Packages are usually a nested array of modules grouped together that represent an entire application. They can be published to pypi which makes it installable using the pip command. A very specific structure is defined.  Python Package directory struct...
Imports
Ok so you have your code in separate files. You may have even installed a few packages to extend the functionality of the base python library. To get these packages, modules, functions or other items into your application for use we have to explore the way...
Classes Intro
Writing your code utilizing classes are regarded as a more refined code structure. There are many benefits to this architecture and only the simplest of applications should avoid using them.   What is object oriented programming?  Lets assume you ...
Class Inheritance and Method Override
As we dig deeper into the world of object oriented programming and classes we will find more ways to reduce lines of code and further improve readability and maintainability for the next programmer. Class Inheritance is a good way to break up your classes in...
The Basics
Functions and methods are not limited to datatype variables as arguments. Functions can be passed as an argument as well. You can wrap your function with more functionality. Seemingly complex, this capability actually simplifies some tasks. def someDeco...