|
|
|
Questions
|
|
|
|
|
Slicing
|
|
|
|
|
slicing [defaults]
|
|
|
|
|
returns a new sequence with the elements from a portion of an existing sequence
|
|
|
|
|
uses the form sequence[start:end:interval]
|
|
|
|
|
start:end:interval
|
|
|
|
|
start:end:[1]
|
|
|
|
|
start:[len]:[1]
|
|
|
|
|
[0]:end:[1]
|
|
|
|
|
[0]:[len]:[1]
|
|
|
|
|
[:] to copy
|
|
|
|
|
Practice: fruit ninja
|
|
|
|
|
final project
|
|
|
|
|
see http://cs.carleton.edu/faculty/awb/cs111/f19/final-project.md.html
|
|
|
|
|
vpython
|
|
|
|
|
see vpython_funtimes.py
|
|
|
|
|
to install: python3 -m pip install --user vpython
|
|
|
|
|
documentation: https://www.glowscript.org/docs/VPythonDocs/index.html
|
|
|
|
|
example programs: https://www.glowscript.org/#/user/GlowScriptDemos/folder/Examples/
|
|
|
|
|
graphics
|
|
|
|
|
see tic-tac-toe.py
|
|
|
|
|
documentation: https://mcsp.wartburg.edu/zelle/python/graphics/graphics/index.html
|
|
|