{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "99c48fb0",
   "metadata": {},
   "source": "(defining-own-functions)=\n\n# Methods\n\nLong programs become unmanageable when all code lives in one place. Methods let you name a block of code, give it inputs, return a result, and reuse the same logic from multiple places.\n\n- **Method definition**: A method packages a named task so the program can call it when needed.\n- **Method signature**: The method name, parameters, and return type communicate how callers should use it.\n- **Parameters**: Parameters let one method work with different input values.\n- **Return values**: A value-returning method computes a result that other code can store or combine.\n\nMethods are the first major step from writing a script toward designing a program. They make code easier to read, test, debug, and extend.\n"
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": "<h2>Video</h2>\n\n```{eval-rst}\n.. youtube:: IPpEefuFiVM\n   :width: 560\n   :height: 315\n```\n\n> *[C# methods 📞](https://youtube.com/watch?v=IPpEefuFiVM)* by Bro Code.\n>\n> This video remains hosted on YouTube and is the property of its original creator or rightsholder; it is embedded here via YouTube's official player for educational reference only.\n",
   "id": "intro-video"
  },
  {
   "cell_type": "markdown",
   "id": "learning-objectives",
   "metadata": {},
   "source": "<h2>Learning Objectives</h2>\n\nBy the end of this chapter, you will be able to:\n1. Define methods with clear names, parameters, and return types\n2. Call methods and use their return values in larger expressions\n3. Design method signatures that communicate intent clearly\n4. Distinguish between `void` methods and value-returning methods\n5. Use methods to remove repetition and organize program logic\n"
  },
  {
   "cell_type": "markdown",
   "id": "chapter-flow",
   "metadata": {},
   "source": "<h2>Chapter Flow</h2>\n\n```{tableofcontents}\n```\n"
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "main_language": "python",
   "notebook_metadata_filter": "-all"
  },
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
