he answers are in white text. Highlight them to see the key and check your answers.
Draw a rectangle at 100, 200. It should be 15 wide and 25 tall.
rect(100, 200, 15, 25
)
Initialize a variable of type String named story to hold the value, "Back in my day..."
String story = "Back in my day...";
Write a for loop that executes 17 times, starting with zero. It should increment by one each time. Inside the loop, print the word "hi."
for(int x = 0; x < 17; x++)
{
println("hi");
}
Write a method named isEven of type boolean that takes an integer as a parameter. It should return true if the integer is even, and false otherwise.
boolean isEven(int num)
{
return num % 2 == 0;
}
OR
boolean isEven(int num)
{
if(num % 2 == 0)
{
return true;
}
else
{
return false;
}
}