Ics - Java Quiz

4 Questions | Attempts: 50
Share

SettingsSettingsSettings
Java Quizzes & Trivia

Quiz 2 - Java. This quiz covers the basic java codes based on Jurtle.


Questions and Answers
  • 1. 

    What are the basic java codes?

    • A.

      Forward(); penUp(); penDown(); backward();

    • B.

      Forward(); backward(); right(); left();

    • C.

      PenUp(); penDown(); setHeading(); setPosition();

    • D.

      Backward(); setHeading(); penDown(); left();

    Correct Answer
    B. Forward(); backward(); right(); left();
  • 2. 

    Write the code to make a circle.

  • 3. 

    What shape does the following code make?int a = 0;while(a<2){forward(200);right(90);forward(50);a++;}

    Correct Answer
    rectangle
    Rectangle
    a rectangle
    A rectangle
  • 4. 

    What will the following code make? Assume that the turtle was in it's starting position.forward(100);penUp();right(90);setPenColor(Color.red);forward(100);right(90);forward(100);right(90);forward(100);

    • A.

      A square

    • B.

      A square with one side black and the remaining sides red

    • C.

      A straight vertical line

    • D.

      Nothing.

    Correct Answer
    C. A straight vertical line
  • 5. 

    What type of number is put in the parenthesis for the following codes?forward();right();

    Correct Answer
    pixels and degrees

Quiz Review Timeline +

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

  • Current Version
  • Mar 14, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 03, 2010
    Quiz Created by
    Kmckenzie29
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.