Computers

9th -

12thgrade

Image

Unit 5 AP CSP Code.org

1.5K
plays

33 questions

Show Answers
See Preview
  • 1. Multiple Choice
    30 seconds
    1 pt
    Image

    .

    Image
    Image
    Image
    Image
    Image
  • 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
    30 seconds
    1 pt
    Image

    Jose is writing a reply function for a text messaging app. He'd like to swap the sender and receiver so that the value currently in variable From ends up as the value in To and To ends up in From


    Which of the following code segments will correctly swap the values as described?

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

    Explore all questions with a free account

    Already have an account?