Sunday, 29 May 2011

Project 3: Concepts

The programming term the above images represent is "if/else".

In coding context:

The eyes idea:

if (it’s nighttime) {
    pupils.larger();
  } else if (it’s daytime) {
    pupils.smaller();
  }




The flower idea:
if (it’s nighttime) {
    flower.closed();
  } else if (it’s daytime) {
    flower.open();
  }




The water idea:
if (the temperature is at freezing point) {
    water.becomes ice();
  } else if (it’s at room temperature) {
    water.stays as a liquid();
  } else if (it's at evaporating point) {
    water.becomes steam();
  }

No comments:

Post a Comment