Decompose, Pattern, Algorithm: Logic Training for Kobe Expat Families
Kobe expat families benefit from transferable logic skills—not only coding syntax. Enquire WhatsApp +92 322 4217059. No fabricated Kobe campus.
Computational thinking logic classes for expat kids in Kobe teach pattern recognition, decomposition and algorithmic design through puzzles, Scratch challenges and mentor feedback—in English.

Video coming soon
Lesson notes and Q&A below are available now. The video will appear here when published.
In earlier topics, loops were introduced as a way to repeat a task multiple times automatically. In software development, functions represent another fundamental and frequently used concept.
A function is a reusable, self-contained block or lines of code designed to perform a specific task. When you write, debug, and refine a high-quality piece of code, you do not want to rewrite it every time that logic is needed. Instead, you preserve and store that code block inside a function. Once stored, you can call and execute that function from any part of your program or across different programs.
Dividing your codebase into modular functions provides major structural advantages:
A fundamental rule when working with functions is the distinction between defining a function and calling it:
To create a function in Python, follow these syntax rules:
def keyword tells the Python interpreter that you are about to define a new function.() follow the name (they can hold parameters), followed by a colon : to start the function body.def statement.This example packages a greeting message inside a function:
# 1. Defining the function (the template)
def greet():
print("Hello, World!")
# 2. Calling the function to execute it
greet()
# 3. Calling the function a second time
greet()
greet function template, but nothing prints to the screen yet.greet(), Python enters the function body and prints Hello, World!.greet() again runs the block a second time.Output:
Hello, World!
Hello, World!
Functions become significantly more versatile when you pass values into them. This allows the same function logic to process different data each time it is called:
# 1. Defining a function with a parameter variable 'name'
def greet(name):
print("Hello", name)
# 2. Calling the function with different input values
greet("Ali")
greet("Sara")
name is placed inside the parentheses to receive incoming values.greet("Ali") is called, the string "Ali" is assigned to name, producing Hello Ali.greet("Sara") is called, "Sara" is passed into name, producing Hello Sara.Output:
Hello Ali
Hello Sara
A function is a reusable, self-contained block of code designed to perform a specific task. Using functions is considered good programming practice because it promotes code reusability—allowing you to write, test, and debug code once and call it multiple times without duplicating lines. It also drastically improves program organization; instead of reading a confusing 2,000-line script from top to bottom, functions break the codebase into modular, descriptively named components that are easy to understand, debug, and reuse in future projects.
No, a function does not execute when it is defined. Defining a function (using the def keyword) merely provides a template or blueprint that Python stores in memory. The function executes only when it is explicitly called by its name followed by parentheses (e.g., greet()). While a function is defined only once, it can be called and executed hundreds or thousands of times throughout a program.
Parameters allow functions to receive dynamic inputs rather than producing fixed, static outputs. By placing a variable name inside the function's definition parentheses (such as def greet(name):), the function can accept different data values each time it is executed. For instance, calling greet("Ali") outputs Hello Ali, while calling greet("Sara") outputs Hello Sara, allowing the same core logic to process diverse inputs dynamically.
Maths for Future Coders on Udemy.
Disclosure: This page contains affiliate links. We may earn from qualifying purchases at no extra cost to you. Links are intended for parents and educators, not as marketing directed at young children.
Kobe expat families benefit from transferable logic skills—not only coding syntax. Enquire WhatsApp +92 322 4217059. No fabricated Kobe campus.
Computational thinking is a problem-solving framework based on decomposition, pattern recognition, abstraction, and algorithmic design. It empowers students in Kobe to approach complex math, science, and coding challenges logically.
Lessons feature interactive logic puzzles, algorithmic games, Scratch code challenges, and real-time mentor code reviews in small, engaging online groups conducted in English.
Message our admissions team on WhatsApp to receive our current JST weekend timetable and claim a free trial session pass.