Ics Practice Quiz 2 - Java

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Aishamo
A
Aishamo
Community Contributor
Quizzes Created: 3 | Total Attempts: 22,698
| Attempts: 177 | Questions: 8
Please wait...
Question 1 / 8
0 %
0/100
Score 0/100
1. What does the following code create:forward(50);right(90);forward(100);right(90);forward(50);right(90);forward(100);

Explanation

a rectangle

Submit
Please wait...
About This Quiz
Ics Practice Quiz 2 - Java - Quiz

ICS Practice Quiz 2 - Java tests understanding of basic Java programming constructs through practical examples. Assess skills in loop structures, methods, and graphical commands, ensuring foundational Java knowledge. Ideal for beginners in Java or those looking to refresh their skills.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. What comes at the end of a command?

Explanation

every command ends with a semicolon

Submit
3. Which of the following are the basic drawing commands?

Explanation

The basic drawing commands are the actions that allow the user to move the pen in different directions and change its position. The commands "forward()" and "backward()" are used to move the pen forward or backward, while "left()" and "right()" are used to rotate the pen in the respective directions. These commands are essential for creating different shapes and patterns in a drawing.

Submit
4. What will happen?
The turtle starts at it's original position. A setPosition command is used and nothing else.

Explanation

The turtle will always leave a mark when it moves unless you use penUp() and penDwn().

Submit
5. What will happen?
for(int i=0; i<4; i++) { forward(50); right(90); }
setDisplayColor(Color.blue);

Explanation

Since setDisplayColor came after the loop (that created a square) it places a block of color over whatever was drawn beforehand. You need to place setDisplayColor first.

Submit
6. What does this create?

penUp();forward(100);right(90);forward(50);right(90);forward(100);right(90);forward(50)

Explanation

The penUp makes the turtle not leave any marks

Submit
7. Which of the following is correct

Explanation

A) the P in not capitalized
B) Color is missing in setDisplayColor
C) Color is missing in Color.blue

Submit
8. What is missing from the following code?
int 1=0;
while  i<45
{forward(20);left(45);
i++;
}

Explanation

Its missing the parentheses around the while's true/false statement: while(i

Submit
View My Results

Quiz Review Timeline (Updated): Apr 9, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Apr 09, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 15, 2009
    Quiz Created by
    Aishamo
Cancel
  • All
    All (8)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What does the following code...
What comes at the end of a command?
Which of the following are the basic drawing commands?
What will happen?The turtle starts at it's original position. A...
What will happen?for(int i=0; i<4;...
What does this...
Which of the following is correct
What is missing from the following code?int 1=0;while ...
Alert!

Advertisement