Index / 2017 / System Variables 02
400×400 · p5.js instance mode
System_Variables_02.pde 30 lines
/*
System Variables 02
02/07/2017
*/

float myFloat = 5.0;
int myInt = 5;

void setup() {
  size(400,400);
  background(#393939);
}

void draw() {
  textSize(24);
  
  fill(#FF0044);
  text("Using Floats",100,75);
  text("+3 = " + str(myFloat+3),100,100);
  text("-3 = " + str(myFloat-3),100,125);
  text("*3 = " + str(myFloat*3),100,150);
  text("/3 = " + str(myFloat/3),100,175);
  
  fill(#);
  text("Using Integers",100,250);
  text("+3 = " + str(myInt+3),100,275);
  text("-3 = " + str(myInt-3),100,300);
  text("*3 = " + str(myInt*3),100,325);
  text("/3 = " + str(myInt/3),100,350);
}
read-only archive source from /2017/Lessons/System_Variables_02/System_Variables_02.pde

Description

This page is generated from the Processing project folder at /2017/Lessons/System_Variables_02/System_Variables_02.pde.

Archive

No companion assets were found in this sketch folder.