pencil-icon
Build your own quiz

9th -

12thgrade

Image

AP computer science unit 2

605
plays

13 questions

Show Answers
See Preview
  • 1. Multiple Choice
    5 minutes
    1 pt

    Which line of code would set x = to a number between 50 and 100?

    int x = (int) (Math.random()*50)+50;

    int x = (int) (Math.random()*50)-50;

    int x = (int) (Math.random()*50)+51;

    int x = (int) (Math.random()*50)+49;

  • 2. Multiple Choice
    5 minutes
    1 pt
    Image

    What is printed when the code is run?

    Frankvelt

    ranklivelt

    Franko

    lino

  • 3. Multiple Choice
    5 minutes
    1 pt
    Image

    What will print when this code is run?

    7

    9.0

    5.66

    5.0

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?