Computers

9th -

12thgrade

Image

AP Computer Science Principles (Final Exam part 2)

504
plays

30 questions

Show Answers
See Preview
  • 1. Multiple Choice
    1 minute
    1 pt
    Image

    ASCII is a character-encoding scheme that uses a numeric value to represent each character. For example, the uppercase letter “G” is represented by the decimal (base 10) value 71. A partial list of characters and their corresponding ASCII values are shown in the table above.


    ASCII characters can also be represented by binary numbers. According to ASCII character encoding, which of the following letters is represented by the binary (base 2) number 1010100?

    N

    P

    T

    W

  • 2. Multiple Choice
    30 seconds
    1 pt
    Image

    Jasmine is writing a shopping app. She has created a variable to keep track of the number of items in the shopping cart. Every time someone clicks the "addItemButton", she would like the variable to increase by 1.


    What code should Jasmine insert where it says <missing code> in order for her app to work?

    cart total = 1;

    cartTotal + 1;

    cartTotal = cartTotal +1;

    var cartTotal = cartTotal + 1;

    var cartTotal + 1;

  • 3. Multiple Choice
    1.5 minutes
    1 pt
    Image

    What is a possible output when the following code segment executes? The ending position of the turtle is shown in each diagram. The starting position is shown as a white triangle in cases where the turtle starts and ends in different locations.

    Image
    Image
    Image
    Image
    Image
  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?