We set the date for our first Python class in San Juan Capistrano for Saturday, July 8. It will run from 9 to 3 with a one hour lunch break. See calendar. In this class you will learn the basic concepts of coding using the popular Python programming language as the tool for learning. Upon successful completion of this course, students will be able to: explore various programming concepts, create simple programs, create and use functions, define classes, implement objects, and handle errors in a program.
Although Python has been around for a while it has become a hot language these days due in part to its widespread use in the booming fields of big data and data science. While we are not addressing those topics in this class you will get an introduction to just how powerful and even fun the easy-to-learn Python language is.
Saturday, May 27, 2017
Wednesday, May 24, 2017
New Python Course
We finished the slide deck for the new Introduction to coding with Python course beta release. This is a brief five hour introductory class organized similar to our Java coding class which is in turn based on the Logical Operations courseware. As a beta release any comments would be welcome.
Friday, May 19, 2017
Instantiating a Python subclass
In this screenshot we instantiate the project manager subclass. The project manager subclass derives from the employee details parent class. Note that there are two cases: one where we input the employee id, name, etc, and the another where we do not supply any arguments to the constructor. In this case the default values in the constructor declaration supply the values.
This concludes our screenshot series for this course. We will be offering it in our studio in the coming weeks.
Click to enlarge |
Thursday, May 18, 2017
Python Subclasses
As with any typical object-oriented language it is possible in Python to create a subclass that inherits properties and methods from a parent or superclass. This is shown in our attached screenshots. The subclass (or child class) can inherit the methods as is or it can override them. This means they are redefined in the subclass. When an object is instantiated from the child class the methods not overridden will work just as they do in the parent class. The overridden methods will work as defined in the subclass.
Our little example shows a project manager subclass created based on the parent employee class. It overrides the salary computation to give a bonus rather than deduct an allowance. It also extends the class by adding a method to return the number of subordinates. Note also the use of the keyword super in the subclass to invoke a method in the superclass.
Our little example shows a project manager subclass created based on the parent employee class. It overrides the salary computation to give a bonus rather than deduct an allowance. It also extends the class by adding a method to return the number of subordinates. Note also the use of the keyword super in the subclass to invoke a method in the superclass.
Click to enlarge view |
Monday, May 15, 2017
Constructors (Initializers) in Python
When you define a class in Python you can include constructor functions (actually initializers in Python) to initialize the instance variables. You can define them to accept arguments when the class is instantiated or to accept no arguments. This accomplishes more or less the same thing as overloaded constructors in Java. In this latter case in Python you would initialize the parameter variables to a desired default value in the constructor declaration. You would not write a separate constructor. Here is the code...
Click for enlarged view |
Friday, May 12, 2017
Python Object Instantiation
Once a class has been created you can instantiate an object from it. In my example the class is in a different file and an import is used in the file that instantiates the class. In this case an employee object is instantiated in a payroll program. The screenshots show the parallel code and execution results in Python and Java.
Click to see enlarged image on box.com. |
Thursday, May 11, 2017
Creating a Python Class
We are back to creating the Python coding course based on the same outline we used for Java coding. We are going to continue the parallel screenshots showing the code in pseudocode, Java and Python. This step shows how to create a simple employee details class. Just define a class and inside the class define your methods (functions). Later steps will instantiate the class,add a constructor, etc.
Click to view enlarged image on box.com |
JavaScript Fiddle
Does everyone know about the JavaScript fiddle? I was working on some CSS snippets from McGrath's book and wanted an easy way to experiment. I found it in the online JavaScript fiddle. It has four panes: JavaScript code, HTML, CSS and results of running same. I think you'll find it pretty neat. It is web based and runs from anywhere in your browser. Try it!
JavaScript Fiddles
There are several other sites out there of this type. Ideone seemed very interesting as it features some 60 different languages.
JavaScript Fiddles
There are several other sites out there of this type. Ideone seemed very interesting as it features some 60 different languages.
Sunday, May 7, 2017
Project Libre Tutorial
The following is a simple little Project Libre tutorial you may find useful. It has 5 parts. It just takes a few minutes per part.
Project Libre Tutorial
Project Libre Tutorial
Tuesday, May 2, 2017
Project Libre Resource View
Below is a screenshot of the of the resource sheet views in both Microsoft Project and Project Libre. As can be seen they are virtually identical. We will cover the Project Libre resource sheet in more detail in later posts in this series. The green shading in the Libre view means that the resources have been assigned in this project. Note that the screenshots are both of the same ".mpp" file. Project Libre can read and write Microsoft Project files.
Click to expand view on box.com |
Subscribe to:
Posts (Atom)