Intro To Computer Science Quiz #3

11 Questions | Attempts: 85
Share
SettingsSettings
Please wait...
  • 1/11 Questions

    What does the following code create:forward(50);right(90);forward(100);right(90);forward(50);right(90);forward(100);

Please wait...
About This Quiz

Basic java terms, concepts, etc.

Computer Science Quizzes & Trivia

Quiz Preview

  • 2. 

    What comes at the end of a statement?

    • Semi-colon

    • Colon

    • Curly brace

    • Parentheses

    Correct Answer
    A. Semi-colon
  • 3. 

    What is missing from the following code?for int i=0; i<45; i++{forward(20);left(45);}

    Correct Answer
    parentheses
    parenthases
    parenthesis
    parenthasis
  • 4. 

    Which of the following are the basic drawing commands?

    • SetPenWidth(); forward(); backward(); right();

    • Forward(); backward(); setHeading(); setPostion();

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

    • SetPenColor(); backward(); right(); forward();

    Correct Answer
    A. Forward(); backward(); left(); right();
  • 5. 

    Which of the following is correct?

    • SetpenColor(Color.blue)

    • SetDisplay(Color.orange);

    • SetDisplayColor(blue);

    • SetPenColor(Color.pink);

    Correct Answer
    A. SetPenColor(Color.pink);
  • 6. 

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

    • A rectangle

    • A square

    • Some lines

    • Nothing

    Correct Answer
    A. Nothing
  • 7. 

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

    • You will see a square with blue background.

    • You will see four squares on a blue background.

    • You will only see a blue background.

    • Nothing will happen.

    Correct Answer
    A. You will only see a blue background.
  • 8. 

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

    • The turtle will do nothing

    • The turtle will move to the new position

    • The turtle will draw a line to the new position

    Correct Answer
    A. The turtle will draw a line to the new position
  • 9. 

    Create the code for making a circle. You must use one of the loop codes.

  • 10. 

    Write the code for making a triangle. You do not need to worry about the angles. Just type in the basic drawing commands.

  • 11. 

    Explain what the following code will do.int h=0;while(h<10){ for(int i=0; i<4; i++) { forward(50); right(90); } h++;}

Quiz Review Timeline (Updated): Mar 21, 2022 +

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

  • Current Version
  • Mar 21, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 01, 2009
    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.