Computational BIM Community (from bimsg.org)

Sunday, 13 January 2019

Python for Architects

What is Computation?
'Computation refers to the manipulation of data by either humans or machines. The data that is manipulated may be numbers, characters, or other symbols' (Punch & Enbody, 2017).

What is Evolutionary Computation?
Punch & Enbody stated that the evolution of biological species can be viewed as a computation process. The computational process is the adaptation of the genetic code and the output is the adaptation that results from the genetic code modification.

What is Algorithm?
Algorithm refers to a sequence of steps that describes how to solve problem or class of problems(Punch & Enbody, 2017). 

What is a Program?
A program refers to a human-readable essay on problem-solving that is also executable on a computer. A program consists of a set of instructions that are executed sequentially. Instructions can be stored as modules which can be imported into the Python interpreter for execution (Punch & Enbody, 2017). 

Expression: is a combination of values and operations that creates a new value that we call a 'return value'.
Statement: Does not 'return a value' but does perform some task and may control the flow of the program.
e.g. 
In    [1]: int = 10
In    [2]: int
Out [3]: 10

In    [3]: int +10
In    [3]: 20

Whitespace refers to the space to separate words. In Python programming, it is being ignored within both expression and statement. However, leading whitespace at the beginning of a line is referred to as indentation, which plays an important role to group statements or expressions.

Interesting reading:
https://www.toptal.com/python/computational-geometry-in-python-from-theory-to-implementation

Useful links:
Reference:
  • W. Punch & R. Enbody (2017). ‘Thinking about Computing’, in 'The Practice of Computing Using Python', Global Ed., Pearson Education Limited, pp. 45- 48
  • W. Punch & R. Enbody (2017).  'The Practice of Computing Using Python', Global Ed., Pearson Education Limited, pp. 101