Week 7 subject 1: Python built-in functions
- abs(x): find out absolute values
- bool(x): returns truth value
- dir(object): returns all information(attributes) of the object
- help(request): evoke the online help system
- eval(expression): run and return result
- exec(object): run expression or program(!)
- float():
- int():
- len():
- min() and max():
- range():
- sum():
constants defined to be false:
None
andFalse
zero of any numeric type:
0
,0.0
,0j
,Decimal(0)
,Fraction(0, 1)
empty sequences and collections:
''
,()
,[]
,{}
,set()
,range(0)
Week 7 subject 2: Game programming with Arcade
Arcade is a good package for developing games with Python. Try to read this code and make changes to make your game more fun.
No comments:
Post a Comment