Basics of functions
Basics of functions - with return values, parameters and more function exercises (Sigma, Factorial functions etc.)
In this chapter, we will look into the basics of functions: those that return values, with parameters. We will also work on several exercises including some bonus material related to the Sigma
, Factorial
etc examples.
- Functions - Introduction
- Functions - let's write a function
- Calling a function - sayMorningGreetings(), showMeTheNews()
- Functions basics - Exercise (SayMorningGreetings)
- Functions basics - Exercise (ShowMeTheNews)
- Functions - A function that calls sayMorningGreetings() and then showMeTheNews()
- Calling 2 functions from a function
- Functions - A function that calls showMeTheNews() and then sayMorningGreetings()
- Calling 2 functions from a function (order matters)
- Functions basics - Points to ponder
- Fix the bug (ShowMeTheNews)
- Functions that return something
- Exercise - Functions that return something
- Functions with input parameters - intro
- Exercise - Functions without input parameters
- Functions with input parameters (simple math)
- Functions with input parameters (rename our function)
- Exercise - Functions with input parameters (squareWithParameter)
- Functions with input parameters (additional math examples)
- Exercise1 - Functions with input parameters
- Exercise2 - Functions with input parameters
- Exercise3 - Functions with input parameters
- Functions with input string parameters (intro)
- Exercise - "Say Morning Greetings" without parameters
- Functions - add the input string parameters
- Exercise - "Say Morning Greetings" using parameters
- The factorial function
- Exercise - The factorial function
- The Sigma(n) function
- Exercise - The factorial function
- The SigmaSquare(n) function
- Exercise - The SigmaSquare(n) function
- The SigmaCube(n) function
- Exercise - The SigmaCube(n) function
- Bonus Material - Functions calling each other
- Bonus Material - Functions calling each other (Company profits)
- Bonus Material - Functions Stack Overflow
- Bonus Material - Functions Stack Overflow (A and B calling each other!)