This chapter provides a rapid introduction to the basic skills needed in Python programming in the context of basic physics. We introduce Python as an advanced, programmable calculator. You learn to write and execute scripts and functions. We introduce how to represent data as vectors and how to plot data-sets and functions. Loop-structures including for and while loops are explained. Simple vectorization is explained, and we show the strong similarity between the mathematical notation and the implementation in Python. We also introduce random numbers and conditional statements and use this to generate random walkers. Finally, we show how to read and plot real data as found on NASA servers.
CITATION STYLE
Malthe-Sørenssen, A. (2015). Getting Started with Programming (pp. 9–29). https://doi.org/10.1007/978-3-319-19596-4_2
Mendeley helps you to discover research relevant for your work.