Syllabus
Unit 1
Introduction to Python Programming
History of Python Programming Language, thrust areas of Python in physics, Integrated Development Environments, installation and use of python distribution: Anaconda, Spyder, Jupiter notebooks.
Fundamental programming with Python: Designing a Program, identifiers, keywords, operators, and expressions. Arithmetic, Logical and Assignment operators, Precedence, Data types: Basic data types: Strings and numbers, displaying an output, type conversion, basic string operations& methods, format specifiers
Unit 2
Tuples, Lists & Dictionaries
Tuples: immutable sequences, creating tuple, basic tuple operations. Lists: mutable sequences, basic list operations, List methods Dictionaries: basic dictionary operations, dictionary method User input variable.
Unit 3
Control structures
Decision Structures: If, If —-else, if ….elif…..else, nested if decision flow statements.
Repetition Structures: condition controlled: while loop. Count controlled: for loop, sentinals, continue and break statements, try and except statements
Unit 4
Functions & Files
Built in function, modules, void function, flow charting, hierarchy charts, Local variables and scope, passing an argument function, value returning functions, Random number generation
Files: introduction to file input and output
Unit 5
Scientific computing packages
Numpy: -Array object, creating array, matrix, indexing, slicing, resizing, reshaping, arithmetic operations, functions, matrices and vector operations Matplotlib: basic plotting, Scipy: Linear algebra operations, equation solving.
Prerequisites & Objectives
Prerequisites
The students should have studied any basic computer language as a prerequisite for the course
Course Objectives
In this course students are introduced to use Python as a tool to solve Physics problems. The emphasis is to learn using a high level programming language without actually going through the logic behind the equations that are to be coded. A minimal understanding of the basic mathematics is assumed. This develops familiarity and equips them to code a large number of physics problems and learn how to obtain results and plots using the software.