Study-Unit Description

Study-Unit Description


CODE PHY1133

 
TITLE Python for Physicists

 
UM LEVEL 01 - Year 1 in Modular Undergraduate Course

 
MQF LEVEL 5

 
ECTS CREDITS 4

 
DEPARTMENT Physics

 
DESCRIPTION This unit serves as an introduction to programming for physicists, focusing on the application of fundamental programming concepts to solve problems in physics. Emphasizing practical skills, the course equips students with a strong foundation in programming languages commonly used in scientific computing, enabling them to implement numerical algorithms, simulate physical systems, and analyze experimental data.

The unit will include:

• Introduction to the Python programming languages;
• Python Basics: syntax, structure, variable, data types, operators, expression, input and output;
• Control Structures: conditional statements, loops and loop control statements;
• Functions and Modules: Defining and using functions, arguments, return values, scoping and an introduction to modules and packages;
• Data Structures: Lists, tuples, dictionaries and sets;
• Python Libraries: Introduction to popular scientific libraries such as NumPy and Matplotlib;
• Application of scientific libraries for numerical computation, data analysis and visualization.

Study-unit Aims:

• Develop a fundamental understanding of programming concepts and their applications in physics;
• Acquire proficiency in utilizing the Python programming language to solve physics-related problems;
• Foster critical thinking skills by applying programming techniques to simulate and model physics systems;
• Gain hand-on experience in data processing and visualization techniques.

Learning Outcomes:

1. Knowledge & Understanding
By the end of the study-unit the student will be able to:

• Write Python code using correct syntax, data types, and fundamental programming constructs;
• Implement control structures, functions and basic data structures in the Python programs;
• Apply Python to solve mathematical problems, manipulate data, and perform numerical calculations;
• Utilize Python libraries like Numpy, Pandas and Matplotlib to process and visualize data effectively;
• Evaluate different Python solutions to the same problem, ranking them based on efficiency and performance.

2. Skills
By the end of the study-unit the student will be able to:

• Demonstrate adeptness in Python programming and utilizing essential data analysis and visualization;
• Deconstruct complex problems and process data sets using Python based techniques;
• Design and implement solutions for various computational tasks.

Main Text/s and any supplementary readings:

Main Text:
- Course notes will be provided to the students

Supplementary Text:
- Hunt, John. "A Beginners Guide to Python 3 Programming", 2023, ISBN 3-031-35122-3
- Matrelli, Alex. "Python cookbook", 2nd edition, O'Reily, 2005, ISBN 0-596-00797-3
- Python documentation (Available online).

 
STUDY-UNIT TYPE Lecture

 
METHOD OF ASSESSMENT
Assessment Component/s Assessment Due Sept. Asst Session Weighting
Assignment SEM1 Yes 100%

 
LECTURER/S Alessio Magro

 

 
The University makes every effort to ensure that the published Courses Plans, Programmes of Study and Study-Unit information are complete and up-to-date at the time of publication. The University reserves the right to make changes in case errors are detected after publication.
The availability of optional units may be subject to timetabling constraints.
Units not attracting a sufficient number of registrations may be withdrawn without notice.
It should be noted that all the information in the description above applies to study-units available during the academic year 2024/5. It may be subject to change in subsequent years.

https://www.um.edu.mt/course/studyunit