2015/05/24

Learn to Program: The Fundamentals (by Jennifer Campbell, Paul Gries)

It's my first day to learn Python. Here are my brief notes for week 1.

two of Python's numeric types: int, float

** : exponentiation (for example, 2**5 = 32)
// : integer division (for example, 2 // 5 = 0)

operator precedence:
** (highest)
- (negation)
* / // %
+ - (lowest)

Python is case sensitive.

def f(data) : return data*0.5
in this case, data is called parameter

value = 8.564
result = round(value)
in this case, value is called argument