Skip to main content

Course Information

In this web page we provide the syllabus of the course Introduction to Python for Physicists, offered by the Department of Physics.

The list of the courses offered during the current accademic year is available here

The list of all courses offered by the Department of Physics is available here.

Code Φ-254
Title Introduction to Python for Physicists
Category C
ECTS 6
Hours 6
Level Undergraduate
Semester Spring
Teacher G. Maravelias
Program

Monday    14:00-17:00     Computer Lab 2
Friday    14:00-17:00     Computer Lab 2

Course Webpage https://eclass.physics.uoc.gr/courses/PH254/
Goal of the Course

In this course an introduction to the programming language Python is presented, so that the students: 
1. Understand and develop code in Python.
2. Understand their data and how to process them.
3. Be able to find and use the appropriate libraries.
4. To obtain, process and visualize data.

Syllabus

Unit I - basic usage: using Jupyter notebooks, introduction to the syntax of the language, variables, strins, lists, dictionaries, tuples, flow control, error handling, functions, classes, objects. 
Unit ΙΙ – numeric usage and data visualization: introduction to the NumPy library, the ndarray data structure, creating plots, the matplotlib and seaborn libraries, data visualization, files (input/output), obtaining and processing data from files, introduction to Pandas.
Unit ΙΙΙ – scientific usage: introduction to the SciPy library, applications of statistics / correlations, modeling, applications on linear algebra / integrals, fitting (least squares), chi2 method, Monte Carlo simulations, introduction and basic principles of Machine Learning, clustering algorithms, decision tress, random forest.

Bibliography

1. "Introduction to Computation and Programming Using Python", John V. Guttag (2022, Papasotiriou, ISBN 9789604911592)
2. "Python - Introduction to Computers", Nikolaos Avouris, Michael koukias, Vasilis Paliouras, Kirakos Sgormpas (2023, Crete University Press, ISBN 9789605245290)
3. "Think in Python", Allen B. Downey (2020, Kleidarithmos, ISBN 9789606450907)