Cognitio Logo

Day 3: Functions and Modules

Functions in Python

  • Defining and calling functions

  • Function parameters and return values

  • Scope of variables (local vs. global)

Built-in Python modules

  • Importing and using modules

  • Overview of common built-in modules (math, random, time)

Introduction to external libraries

  • Pip and package management (basic introduction)

  • Importing and using external libraries

Hands-on project: Personal Library Organizer

Students will develop a Python script that organizes their personal library. The script will allow users to add, remove, search, list, and recommend books in their collection.