An introduction to Python for non-programmers.
This lesson is based primarily on material from the Software Carpentry lessons Programming with Python and Plotting and Programming in Python, along with contributions from the teachers of the course Programming for Astronomy and Astrophysics at the University of Amsterdam.
The lesson teaches novice programmers to write modular code to perform data analysis using Python. The emphasis, however, is on teaching language-agnostic principles of programming such as automation with loops and encapsulation with functions, see Best Practices for Scientific Computing and Good enough practices in scientific computing to learn more.
The main example used in this lesson analyses a set of 12 files with simulated inflammation data collected from a trial for a new treatment for arthritis. Learners are shown how it is better to automate analysis using functions instead of repeating analysis steps manually.
The rendered version of the lesson is available at: https://philuttley.github.io/prog4aa_lesson1/.
Instructional material from this lesson is made available under the Creative Commons Attribution (CC BY 4.0) license. Except where otherwise noted, example programs and software included as part of this lesson are made available under the MIT license. For more information, see LICENSE.md.
Software Carpentry is a volunteer project that teaches basic computing skills to researchers since 1998. More information about Software Carpentry can be found here.
The Carpentries is a fiscally sponsored project of Community Initiatives, a registered 501(c)3 non-profit organisation based in California, USA. We are a global community teaching foundational computational and data science skills to researchers in academia, industry and government. More information can be found here.