Python Programming: Formatting Strings.
NB: The notes are copied direct from Sublime 3 IDE. The triple quotes indicated
comments in python
You can format strings the way you want by calling format()
method on a string to produce the format you desire.
SURVEY OF OPERATION RESEARCH/MANAGEMENT SCIENCE.
The survey was conducted between 2005 and 2010 and comprises of 155 research papers. The
research was founded on another research (Altay & Green, 2006) that was conducted on
Operation Research/MS applied to
Python programming: Sets
A set, is perhaps the simplest possible container, since it contains objects in no particular order with no
particular identification (Lott, 2010). Each object in a set stand by itself.
With a sequence, objects are identified by t
Python programming: Sequences
A sequence is a container of objects which are kept in a specific order. We call them containers because
they are a single object which contains any number of other objects.
The phrase any number means that they can contain z
Python programming: Generators and Iterators
Iterators uses the for loop to iterate trough elements of sequence, i.e. string, list, tuples. It can also
iterate through dict and sets.
A generator function is a function that can be used
Python programming: File I/O
Printing to the screen:
The simplest way to print to the screen is using the print () function. You can pass zero or more
expressions separated by comas. This function converts the expressions you pass into a string
Python programming: Files
One of many definition of a file can be; a file is a container for a sequence of bytes. Files can be stored in
persistent but slow devices like disks. Files can also be presented as a stream of bytes flowing through a
Python programming: Exception handling
A good program should execute even though it has some errors. This is made possible by error handling
What is an exception? An exception is any occurrence of an event that interrupts the ordinary sequential
Python Programming: Classes
A class is simply a template or factory for creating objects.
We will start by looking at the 4 features of python objects which are:
Identity: each object is unique and stored in its own location in the memory. Object can be r
On Error Resume Next
Dim objFSO, objTextFile, objWMIService
Dim sCompName 'Local computer name
Dim roomName 'Room where computer is located
Dim machName 'this computer's number
Dim userName 'logge
Homework #1 of Computer Architecture
Note: In some problem (this is true for the entire quarter) you will need to make some
assumptions since the problem statement may not fully specify the problem space. Make sure