Python

PSPP Python

Python For Loops really comfortable with range function: for n in range(2,10): for x in range(2, n): if n% x == 0: print(n, 'equals', x, '*', n//x) break else: #Loop fell through without finding a factor print(n, 'is a prime number') Scope Rules different Scopes local inside function(method,…) global in the surrounding modul built-in pre defined names(open, len,…) function call creates a local scope search order when reading local > global > built-in