Code Concepts

The fundamentals of programming...

A conditional statement is either true or false. Depending on the answer a predefined set of rules will occur.


So... let's pretend the mouse asks the duck "Would you like mango juice?".


Select the 'Yes' or 'No' button.


Image of mouse waiter asking duck customer a question with a glass of mango juice
Image of mouse waiter asking duck customer a question with a glass of mango juice

Nothing happens! The mouse and duck remain exactly as they were.


Based on this fixed question there are only two outcomes:
    EITHER
  • The answer is 'Yes' and the duck will get mango juice.
  • OR
  • The answer is 'No' and Nothing will happen resulting in the duck not getting mango juice.

A function is a set of instuctions that perform a task.


So... let's pretend the duck orders a quiche from the menu. The act of ordering will set off a chain of events, hopefully resulting in the duck getting the quiche.


Select the 'Function'.

image description
  • Function
  • Duck orders quiche...
  • image description
  • Event 1
  • owl bakes quiche...
  • image description
  • Event 2
  • mouse brings quiche...
  • image description
  • Result
  • duck gets quiche.

  • The intention of the function is to perform a series of tasks. In this case the duck ordered a quiche setting off a chain of events resulting in the duck getting a quiche.

    A data-type is a way of assigning a particular way or method of reading something so it can be understood but also used as intended.


    The duck needs to assign a duck-language so it can read the menu and use the menu to order.


    Select the 'Assign Language' button.


    If the menu was not assigned the duck-language the duck would not have been able to read the menu and then use the menu to order. In this case the assigning of the language is like assigning a data-type.

    A variable is used as a container to hold various pieces of information.


    Think of a dish being like a varibale, it can be used to hold various things like a cake or stew. In this case this dish is to hold a quiche.


    Select the ingredients.

    image descriptio
    image description image description image description image description

    Now that the ingredients are all combined together in the dish making a quiche, the dish can be moved around as one thing like moved to the oven, or we could add more things to it like spices.

    A loop is just like it sounds... it will keep doing the same predefined rule/s until the predefined criteria is met.


    The owl needs the oven to be set to 375°F. When the oven is turned on, the temperature will increase until the preset temperature of 375°F is achieved.


    Select the oven to turn it on!


    image description image description
    0°F
    The thermostat will check via a loop the increasing temperature until the desired 375°F is achieved. Once 375°F is attained the temperature will stop increasing.