✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Given the following code, which letter should be pressed to move the circle to the left, and how many times should it be pressed to place the circle at the centre of the canvas?
let x = 400;
function setup() { createCanvas(400, 400);}
function draw() { background(0, 255, 255); fill(255, 0, 0); ellipse(x, 200, 50, 50);}
function keyPressed() { if (key == "l") { x = x + 20; } else if (key == "j") { x = x - 20; }}