13/11/2024

Week 7 Learning Summary

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():
It is essential skill to be able to look up reference websites to continually learn Python.  Example: Python Docs.

    • constants defined to be false: None and False

    • zero of any numeric type: 00.00jDecimal(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: