Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

RWTH Aachen University

Scientific Programming for AI

RWTH Aachen University via edX

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!

Get ready to dive into the exciting world of Python programming! This comprehensive course is designed to provide you with a deep understanding of fundamental Python techniques, including data structures, control statements, and functions. You'll also explore advanced concepts such as iterators, file handling, and exceptions, giving you a well-rounded foundation in Python programming.

But that's not all! You'll also get hands-on experience with powerful libraries like Pandas, NumPy, and MatPlotLib, which are essential for success in Data Science and Machine Learning. These libraries will enable you to manipulate and visualize data like a pro, making your insights more impactful and your work more efficient.

Throughout the course, you'll complete weekly programming exercises, giving you the opportunity to apply and practice what you've learned. This hands-on experience will help you build confidence in your programming skills and enable you to execute programming solutions with ease.

By the end of the course, you'll be able to critically evaluate and interpret the results of your code, making you a valuable asset in any data-driven field. Whether you're looking to start a career in Data Science, Machine Learning, or simply want to expand your programming skills, this course is the perfect starting point. So, are you ready to master Python programming and unlock a world of opportunities? Let's get started!

Syllabus

Week 00: Welcome

Scheduled: 01 July 2024

We will learn how to work with Jupyter Notebooks and will get acquainted with what we’ll learn in later courses.

Week 01: Introduction into Python

Scheduled: 01 July 2024

We will learn the fundamentals of Python programming, including understanding Python as a high-level language, mastering expressions and variables, and grasping data types and comments. We will also explore operators and simple function calls, and learn how to convert data types, obtain user input, and manipulate strings. Through hands-on exercises, we will develop a solid foundation in Python programming and be able to write reusable code blocks. By the end of this chapter, we will be able to write Python code that is efficient, readable, and well-structured.

Week 02: Data Structures

Scheduled: 08 July 2024

We will learn to comprehend fundamental data structures in Python, including lists, tuples, sets, and dictionaries, and understand their characteristics, use cases, and advantages. We will master indexing and slicing techniques to access and extract data from these structures. We will also explore multidimensional structures, such as lists of lists and dictionaries of dictionaries, to model real-world scenarios. Additionally, we will utilize queues and stacks, understanding their specialized access patterns and behaviors, including FIFO and LIFO. By the end of this chapter, we will be able to effectively work with various data structures in Python.

Week 03: Control Statements

Scheduled: 15 July 2024

We will learn to understand conditional statements, including if-else constructs, and develop logical thinking skills by designing programs with branching logic. We will explore the enhanced conditional matching feature of match-case, introduced in Python 3.10, and learn how to apply it to simplify code and improve readability. We will master looping with iteration using the for loop, and learn how to utilize loop control statements such as break and continue to alter loop behavior. We will also implement conditional loops using while loops, and understand when to use them instead of for loops. By the end of this chapter, we will be able to write efficient and effective code using conditional statements and loops in Python.

Week 04: Functions

Scheduled: 22 July 2024

We will learn to understand the components and syntax of functions in Python, including how to define a function, its structure, and proper syntax. We will master different input argument types and learn how to apply them in specific use cases. We will explore function calls and naming arguments, including how to pass arguments, use named arguments, and utilize default values. We will also grasp the concept of variable scope and lifetime, including global and local scopes, and how they affect the accessibility and visibility of variables within functions. By the end of this chapter, we will be able to write and use functions effectively in our Python code.

**Week 05: External Modules & Reference Semantic **

Scheduled: 29 July 2024

External Modules

In this chapter, we will learn about external modules in Python, including their role in extending functionality, the concept of namespace, and the benefits of using them for code modularity and reusability. We will master the process of importing and utilizing modules, including different ways to import modules and common practices for using them effectively. We will explore essential modules such as math, statistics, random, and datetime, and learn how to use them for advanced mathematical operations, statistical calculations, and working with dates and times. We will also utilize string and text manipulation modules and explore popular machine learning and data science libraries like numpy, matplotlib, pandas, and scikit-learn. By the end of this chapter, we will be able to effectively use external modules to extend Python's functionality and perform various tasks, including data analysis and predictive modeling.

Reference Semantic

We will learn about reference semantics in Python, including how it affects variable assignment and comparison, and the difference between variables and objects. We will master the concepts of aliasing and copying, understanding how to avoid unintended side effects and create independent copies of objects. We will explore the differences between shallow and deep copying, including when to use each type based on specific needs. We will also learn how to utilize default function parameters in Python, including their purpose, advantages, and how to define functions with default parameter values. By the end of this chapter, we will be able to effectively work with objects and functions in Python, avoiding common pitfalls and writing more efficient and flexible code.

**Week 06: Functional Programming & Iterators **

Scheduled: 05 August 2024

Functional Programming

We will master lambda functions, learning how to create concise, anonymous functions and when to use them instead of traditional function definitions. We will also understand list comprehensions, a concise way to create lists based on existing sequences, and learn how to craft efficient and readable list comprehensions. Additionally, we will explore the filter() function for selecting elements from a sequence based on a given condition, and learn how to apply the Cartesian product and zip() function to combine elements from multiple sets and pair elements from multiple collections. We will also utilize the reduce() function from the functools module to perform cumulative computations and reduce a sequence to a single value. By the end of this chapter, we will be able to write more concise and efficient code using these advanced Python concepts.

Iterators

In this chapter, we will learn about non-indexed iterables, including their role in providing sequential access to elements and how they differ from indexed iterables. We will also master iterator objects and explore the itertools module, which provides efficient iterators for common tasks. Additionally, we will understand how to use generators, a concise and memory-efficient way to create iterators, and learn how to implement a Fibonacci number generator using a generator function. We will also demonstrate how to create an iterator class for Fibonacci numbers and design a prime number generator. By the end of this chapter, we will be able to effectively work with iterables, iterators, and generators in Python, improving the efficiency and readability of our code.

Week 07: File Handling & Exceptions

Scheduled: 12 August 2024

File Handling

We will learn how to read and write text files in Python, including how to use the with statement for efficient file handling and resource management. We will also explore how to create and write to new text files, as well as append content to existing files without overwriting their contents. Additionally, we will discover how to work with CSV files, including reading data from them using the csv module and writing data to them with various formatting options. We will also delve into object serialization, understanding its importance in data storage and transfer, and learning when to use it in scenarios such as caching and data persistence. By the end of this chapter, we will be able to effectively work with files and data in Python, including reading, writing, and serializing data.

Exceptions

In this chapter, we will learn about exceptions and syntax errors, including how to define and differentiate between them, and the importance of handling exceptions to prevent program crashes. We will identify common exceptions and learn how to raise and handle them using the raise statement and try-except blocks, ensuring program robustness and error management. We will also explore how to handle various exceptions using multiple except clauses and general except clauses, and understand how exceptions propagate up the call stack when unhandled. Additionally, we will discover how to define custom exceptions by creating classes that inherit from the base Exception class, allowing us to handle application-specific errors. By the end of this chapter, we will be able to effectively handle exceptions and errors in Python, making our programs more reliable and robust.

Week 08: NumPy

Scheduled: 19 August 2024

We will learn how to install and set up NumPy, a powerful library for numerical computing in Python. We will explore the importance of data types in NumPy and learn about the various data types available, including integers, floats, and complex numbers. We will then delve into NumPy arrays, learning how to create them, understand their properties, and manipulate them using indexing and slicing techniques. We will also discover how to utilize vectorization and broadcasting to enhance computational efficiency, and learn how to perform statistical analysis, linear algebra, and random number operations using NumPy. By the end of this chapter, we will be able to efficiently work with NumPy arrays, perform various numerical computations, and conduct statistical analysis.

Week 09: Pandas

Scheduled: 26 August 2024

In this chapter, we will introduce the Pandas library, a powerful tool for data analysis and manipulation, and learn how to set it up and import it into our Python environment. We will then explore how to work with single columns in a Pandas DataFrame, including accessing and modifying specific columns, renaming columns, and applying functions. Next, we will learn how to modify and transform DataFrames by adding, dropping, or rearranging columns, and how to select and filter rows based on conditions using boolean indexing and query methods. We will also discover how to aggregate and analyze data using functions like sum, mean, and count, and how to group data based on specific columns for group-wise analysis. Finally, we will apply our new skills to a real-world case study, analyzing weather data to determine if Aachen is the rainiest city in Germany.

Week 10: Matplotlib

Scheduled: 02 September 2024

We will learn the importance of data visualization and how to use Matplotlib, a powerful Python library, to create effective visualizations. We will discover how to customize plots by modifying colors, styles, and labels, and how to add titles, legends, and annotations to enhance plot clarity. We will also learn about the concepts of figures and axes in Matplotlib's plotting framework and how to create multiple subplots within a figure. Additionally, we will explore how to create scatter plots to visualize relationships between two variables, box plots to visualize data distribution, and histograms to visualize data frequency. Finally, we will learn how to use Matplotlib to visualize and manipulate images, including displaying images, adjusting color channels, and applying filters.

Taught by

Prof. Dr.-Ing. Ulrik Schroeder and Dr. Volodymyr Sokol

Reviews

5.0 rating, based on 1 Class Central review

Start your review of Scientific Programming for AI

  • Profile image for Mirat Ul Ain
    Mirat Ul Ain
    its really good and informative.it give me information and a lot of knowledge .thank you very much. But it is too long .and take to much time so please check this issue to solve the problem.

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.