Skip to content

improve(docs): Basics -> Functions #191

@PoetaKodu

Description

@PoetaKodu

Overview

Rework the lesson structure, split into sublessons (examples, exercises, etc.)

Functions

  • Lesson structure
    • Motivation
    • Introduction
    • Creating functions
      • a basic example without parameters (a procedure)
      • with parameters
      • return statement
      • returning a value
      • Declaration and definition
    • Overloading (basics)
    • Summary
  • 💡 Examples
    • calculate area of a circle
    • convert Fahrenheit to Celsius
    • calculate factorial of a number
    • average value of array of numbers
    • calculate gcd
    • calculate a power of a number (exponent is a positive integer)
    • reverse a string
    • check if a string is a palindrome
  • 💢 Common problems
    • incorrect number or type of arguments
    • not returning a value
    • missing declaration
  • 📚 Exercises
    • count occurrences of a character in a string
    • count number of vowels in a string
    • detect if string is an anagram
    • convert int to string

Metadata

Metadata

Assignees

Labels

courseRegarding a course lesson/articleest. time: < 1 weekA loose time estimation of less than one week of work.

Type

No type

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions