Ics - Java Quiz

4 Questions | Total Attempts: 50

SettingsSettingsSettings
Java Quizzes & Trivia

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


Questions and Answers
  • 1. 
    Write the code to make a circle.
  • 2. 
    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();

  • 3. 
    What shape does the following code make?int a = 0;while(a<2){forward(200);right(90);forward(50);a++;}
  • 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.

Back to Top Back to top