Skip to main content

Month 9 of 12

Functions

Writing reusable blocks of code. This is Month 9 of the 12-month Brolly Python course for kids aged 9 to 15, and it ends with a test and the project “Calculator Using Functions”.

  • 4 weeks
  • 8 live classes
  • a test and a project
Month 9
34def area(w, h)12return

8 classes in 4 weeks

The classes

2 live classes a week, in this order. Under each class is what it teaches.

  1. Week 1

    What Are Functions?

    1. Class 1 of 8 · No. 65Introduction to Functions
      • Say what a function is and why programmers use them
      • Recognise a function call, a name followed by round brackets
      • Use a function you've been given without knowing how it works inside
    2. Class 2 of 8 · No. 66Built-in Functions
      • Use common built-in functions like abs(), round(), sum(), sorted() and type()
      • Combine built-in functions to solve small problems
      • Know that built-in functions are ready to use without writing them
  2. Week 2

    Creating Your Own Functions

    1. Class 3 of 8 · No. 67User-Defined Functions and the def Keyword
      • Write your own function with def
      • Indent the function's body and name it well
      • Know that defining a function doesn't run it
    2. Class 4 of 8 · No. 68Calling Functions
      • Follow the order a program runs in when it calls functions
      • Call functions from loops, ifs and other functions
      • Fix common calling mistakes (missing brackets, calling before defining)
  3. Week 3

    Giving Information to Functions

    1. Class 5 of 8 · No. 69Parameters and Arguments
      • Give a function information through a parameter
      • Tell the difference between a parameter and an argument
      • Call one function with different arguments to get different results
    2. Class 6 of 8 · No. 70Multiple Parameters
      • Write a function with two or more parameters
      • Match arguments to parameters by position
      • Use keyword arguments to name which value goes where
  4. Week 4

    Getting Results Back

    1. Class 7 of 8 · No. 71Return Statements and Default Arguments
      • Send an answer back from a function with return
      • Use a returned value in a variable, a calculation or an if
      • Give a parameter a default value
    2. Class 8 of 8 · No. 72Local and Global Variables
      • Know that a variable made inside a function is local to it
      • Read a global variable inside a function
      • Prefer parameters and return over changing global variables
  5. End of the month

    Revise, take the test, build the project

    1. Step 1

      Monthly revision

      Everything from the month, before the test

    2. Step 2

      Month 9 test

      60 minutes · 50 marks · 6 parts

      • AMultiple Choice Questions
      • BFill in the Blanks
      • CFind the Output
      • DFind and Correct the Error
      • EPractical Coding
      • FLogical Thinking

After each live class, its examples and practice for your child's age open in the Brolly Python app.

on the year road

Where Month 9 sits in the course

The course is one road of 12 months. The months before this one are filled in, Month 9 is the gold stop, and the months still ahead are dashed.

  • Months 1 to 4
  • Months 5 to 8
  • Months 9 to 12

next step

See if the course suits your child

Book a free trial class, online or at our Hyderabad centre. A teacher will answer your questions, help you choose a batch and tell you the fees.