Last active
October 17, 2016 14:25
-
-
Save shiffman/387e3a4882427099a112b69b9be261cd to your computer and use it in GitHub Desktop.
code for ICM "Quiz"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Please copy and paste the code to the p5 web editor to do the following questions. | |
var p; | |
var x = 50; | |
var y = 50; | |
function setup() { | |
// create a p element. | |
p = __________('Waiting.'); | |
} | |
function draw() { | |
// set element p's x, y position | |
p._______(x, y); | |
// update element p's x, y position | |
x = x + round(random(-1, 1)); | |
y = y + round(random(-1, 1)); | |
// update element p's content | |
p.________('x: ' + x + '<br />y: ' + y ); | |
// change element p's background color | |
p.________('________', '________'); | |
// add paddings to element p | |
p.________('________', '________'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment