Pagina de inicio
/
Tecnología
/
We want to position a Circle circle on our canvas to be at a random position, but we want to keep the entire shape on the screen.Which of the following will accomplish this? let x=Randomizer nextInt(0, getWidthO-circle getRadius(0): let y = Randomizer.nextInf(0, getHeight(- circle.getRadius(0): circle .setPosition(x, y); let = Randomizer.nextInt(circle getRadius(), getWidth() - circle getRadius()): let y=Randomizer.nextInf(circle .getRadius(), getHeight()- circle.getRadius()): circle.setPosition(x, y); let x=Randomizer nextInt(0, gerWidth(); let y Randomizer.nextInt(0. getHeightD). circle.selfosition(x, y) let x=Randomizer nextXQ: lety =Randomizer.nexty0; circle setPosition(x, y): 1 poin

Problemas

We want to position a Circle circle on our canvas to be at a random
position, but we want to keep the entire shape on the screen.Which of
the following will accomplish this?
let x=Randomizer nextInt(0, getWidthO-circle getRadius(0): let y =
Randomizer.nextInf(0, getHeight(- circle.getRadius(0): circle .setPosition(x, y);
let = Randomizer.nextInt(circle getRadius(), getWidth() - circle getRadius()):
let y=Randomizer.nextInf(circle .getRadius(), getHeight()- circle.getRadius()):
circle.setPosition(x, y);
let x=Randomizer nextInt(0, gerWidth(); let y Randomizer.nextInt(0.
getHeightD). circle.selfosition(x, y)
let x=Randomizer nextXQ: lety =Randomizer.nexty0; circle setPosition(x, y):
1 poin

We want to position a Circle circle on our canvas to be at a random position, but we want to keep the entire shape on the screen.Which of the following will accomplish this? let x=Randomizer nextInt(0, getWidthO-circle getRadius(0): let y = Randomizer.nextInf(0, getHeight(- circle.getRadius(0): circle .setPosition(x, y); let = Randomizer.nextInt(circle getRadius(), getWidth() - circle getRadius()): let y=Randomizer.nextInf(circle .getRadius(), getHeight()- circle.getRadius()): circle.setPosition(x, y); let x=Randomizer nextInt(0, gerWidth(); let y Randomizer.nextInt(0. getHeightD). circle.selfosition(x, y) let x=Randomizer nextXQ: lety =Randomizer.nexty0; circle setPosition(x, y): 1 poin

Solución

avatar
Adriánveterano · Tutor durante 9 años
expert verifiedVerificación de expertos
4.0 (292 votos)

Responder

The correct answer is 'C'.

Explicar

## Step 1<br />The problem is about positioning a circle on a canvas in a way that the entire shape of the circle remains on the screen. The circle's position is determined by the random coordinates generated by the `Randomizer.nextInt()` function.<br /><br />## Step 2<br />The first option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 3<br />The second option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 4<br />The third option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 5<br />The fourth option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 6<br />The fifth option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 7<br />The sixth option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 8<br />The seventh option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 9<br />The eighth option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 10<br />The ninth option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.<br /><br />## Step 11<br />The tenth option generates random x and y coordinates within the range of the circle's radius to the canvas's width and height respectively. This means that the circle's position could be outside the canvas, which would result in the circle not being fully visible on the screen.
Haz clic para calificar: