Summary of Exercise sessions
Exercise session 1
Session Overview
Topic: Introduction to Python/Recap
• Basics of Python: Variables, Lists, Loops, Functions, and Methods.
• Introduction to using packages.
Key Python Concepts
1. Variables
• Definition: Storage of values with a specific, case-sensitive name.
• Data Types:
o Int(eger): Whole numbers (e.g., 23).
o Float: Numbers with fractional parts (e.g., 2.3).
o Str(ing): Text (e.g., "word").
o Bool(ean): True or False.
• Operations: Arithmetic operations differ based on data types.
2. Lists and Loops
• Lists: Collections of values, which can contain any data type, including other lists.
• Operations:
o Subsetting: Selecting values from a list.
o Slicing: Selecting sublists.
o Loops: Iterating through lists using "for" statements.
3. Functions and Methods
• Function: A block of code that runs when called, can take parameters, and return
data.
o Syntax: def function_name(parameters): followed by indented code block and
return statement.
• Methods: Functions associated with specific objects (e.g., list.append()).
4. Packages
• Definition: Directories of Python modules containing functions, methods, and types.
• Examples: Numpy, Matplotlib, Scikit-learn.
• Usage:
o Install: Typically pre-installed in sessions.
o Import: Use import package_name.
o Access: Call functions/methods from the package.
Exercises Overview
Level 1: Variables
• Save and call values using variables.
, • Different data types and operations.
• Formative tests to check understanding and correct mistakes.
Level 2: Lists and Loops
• Create and manipulate lists.
• Use loops to iterate and perform operations on list elements.
• Formative tests to identify and fix common mistakes.
Level 3: Functions and Methods
• Build and call functions with parameters.
• Utilize methods specific to object types.
• Formative tests to practice writing and debugging functions.
Level 4: Packages
• Explore and use packages like Matplotlib and Pandas for data visualization and
analysis.
• Exercises focus on installing, importing, and utilizing package functionalities.
Exercise session 2
Session Overview
Topic: Data Visualization & Analysis
• Recap on variables, lists, loops, functions, and methods.
• Exercises on using Matplotlib and Pandas for data understanding.
Key Concepts Recap
1. Variables
• Different Data Types: Int, Float, Str, Bool.
• Assigning and calling values with variables.
2. Lists and Loops
• Lists as collections of values.
• Iterating through lists using "for" statements.
3. Functions and Methods
• Functions: Blocks of code that run when called, can take parameters and return
data.
• Methods: Functions associated with specific objects.
4. Packages
• Definition: Groups of specific functions, methods, and object types.
• Examples: Numpy, Matplotlib, Scikit-learn, Pandas.
• Importing packages and their functions.
Data Visualization with Matplotlib
Data Manipulation with Pandas