Derived from
|
20410560 IN400- Python and MATLAB programming
in Computational Sciences LM-40 (professor to define)
(syllabus)
The course will cover the following aspects of Python programming:
• Introduction to Programming: Computer architectures; memory and data; CPU and programs; programming languages; problems, algorithms, and programs. • Using the Python Interpreter: Invoking the interpreter; passing arguments; interactive mode; notebooks; online coding platforms. • Basic Python Programming Concepts: Variables and assignments; expressions and statements; operations; printing; comments; debugging; data types; numbers and strings; input. • Functions: Built-in functions; function calls; importing modules and functions; mathematical functions; function composition; defining new functions; parameters and arguments; required and optional arguments; argument order and keyword assignment; variable scope. • Making Decisions: Boolean expressions and logical operators; conditional and alternative execution; if-elif-else structure; chained and nested conditionals. • Iterations: Variable reassignment and updates; while loop; break statement; sequences and loops; the in operator; for loop. • Data Structures (strings, lists, tuples, dictionaries): Definition, properties, operations, and methods; indexing vs. assignment; mutability and immutability; map, filter, and reduce; referencing and aliasing; packing and unpacking; search and reverse search; variable-length arguments. • Files: Persistence; opening and closing files with the with statement; reading and writing; format operator; file names and paths; handling exceptions; pickling. • Modules and Packages: Defining a module; defining a package; importing a package vs. importing a module vs. importing a function; installing packages. • Classes and Objects: Classes, types, objects, and instances; instances as return values; attributes and methods; object mutability; instantiation and the __init__ method; operator overloading and special methods; static methods and class methods; inheritance. • Pythonic Programming: Conditional expressions; EAFP (Easier to Ask for Forgiveness than Permission); list comprehensions; generator expressions; any and all operators; sets. • Scientific Programming: Numpy, arrays, and broadcasting; Pandas, dataframes, and series; Scikit-Learn and an introduction to machine learning with Python; Matplotlib and data visualization in Python.
(reference books)
Allen B. Downey, “Think in Python" (2nd edition)”, Green Tea Press, 2015
|