PREVIOUS: System basics
UP: Course Outline
NEXT: Modeling Particle Motion
2a. Programming Essentials
Review: creating and running a program
C++
and
Python
solutions to in-class exercise 1.1.
C++
and
Python
solutions to in-class exercise 1.2.
Reference
C basics
text editors
streams and pipes
programs
test1.cc
,
test2.cc
,
test3.cc
(python equivalents:
test1.py
,
test2.py
,
test3.py
)
usage:
test1 | test2 | test3
more on graphics
gnuplot
,
plot_data
, and
gpl
-->
pgpl
, a python version of
gpl
.
In-class exercise #1a
C++
and
Python
solutions to part (a)
C++
and
Python
solutions to part (b)
Using
functions
to simplify tasks