SzabiSch / bootcamp-schedule

0 stars 0 forks source link

Intro to Programming with P5: Variables Refactoring #56

Closed codingbootcampseu closed 3 years ago

codingbootcampseu commented 3 years ago

Please use the sketch from the previous task.

Hints

Global variables can be created with the let keyword.

Global variables need to be declared outside of functions.

let canvasSize = 400;

function setup() {
  createCanvas(canvasSize, canvasSize);
}

Bonus

Also create variables for the x and y coordinates of the squares, the gutter (space between squares).

Calculate the size of the squares based on the canvas size and gutter size.

The idea is to change the appearance (dimension and spacing) of the logo only with changing single variables.

The example solution for the bonus can be found here.

Example Solution

SzabiSch commented 3 years ago

Beispielaufgabe hat mathematischen Fehler in der Reihe Nr 4. multiplizieren ist stärker als addieren, sprich () sind überflüssig, nur die zweite beim dividieren ist wichtig