← Data: variables, lists and saving lesson New set →

App Dev Worksheet: Variables, Lists and Saving

App development lesson 15: Data: variables, lists and saving · Set 567 · 40 questions
TalentJR

Developer's tip (Box, list, place): A variable holds one value; a list holds many in order. Positions start at 0. push adds to the end; pop takes off the last item; length is how many items. On the phone: works offline, private. In the cloud: shared, any device, needs the internet.

NameDateTime takenScore ___ / 40
  1. 1.💾 Where should the app save a shared to-do list: on the phone or in the cloud? (a) in the cloud (b) on the phone
  2. 2.💾 Saving data in the cloud lets you ___. (a) use it on any device (b) shrink the app (c) never need a password (d) skip the internet
  3. 3.💾 Where should the app save a draft you are typing: on the phone or in the cloud? (a) in the cloud (b) on the phone
  4. 4.💾 What number does this code show?
    let lives = 8;
    lives = lives - 8;
    lives = lives + 1;
    show(lives);
  5. 5.True or false: the sound on/off setting fits saving on the phone. (a) True (b) False
  6. 6.💾 Where should the app save photos on two devices: on the phone or in the cloud? (a) in the cloud (b) on the phone
  7. 7.💾 What number does this code show?
    let notes = ["Art", "Maths"];
    notes.push("Music");
    notes.push("Sports");
    show(notes.length);
  8. 8.Which of these fits saving on the phone? (a) notes to read offline (b) photos on two devices (c) a shared to-do list (d) chat messages to friends
  9. 9.💾 What number does this code show?
    let lives = 7;
    lives = lives - 4;
    lives = lives + 3;
    show(lives);
  10. 10.Which of these fits saving on the phone? (a) a class leaderboard (b) chat messages to friends (c) photos on two devices (d) a draft you are typing
  11. 11.💾 In most code, the first item of a list is at position ___. (a) 1 (b) 10 (c) 2 (d) 0
  12. 12.Which of these fits saving on the phone? (a) photos on two devices (b) a shared to-do list (c) the sound on/off setting (d) a class leaderboard
  13. 13.💾 Where should the app save your last game level: on the phone or in the cloud? (a) in the cloud (b) on the phone
  14. 14.💾 What does this code show? (Positions start at 0.)
    let notes = ["Art", "Maths", "Science"];
    show(notes[2]);
    (a) Art (b) Science (c) Maths
  15. 15.💾 What number does this code show?
    let points = 7;
    points = points - 5;
    points = points + 3;
    show(points);
  16. 16.Which of these fits saving in the cloud? (a) notes to read offline (b) the sound on/off setting (c) your last game level (d) a shared to-do list
  17. 17.💾 Where should the app save notes to read offline: on the phone or in the cloud? (a) in the cloud (b) on the phone
  18. 18.💾 What does this code show? (Positions start at 0.)
    let friends = ["Arjun", "Riya", "Aman"];
    show(friends[0]);
    (a) Aman (b) Arjun (c) Riya
  19. 19.True or false: chat messages to friends fits saving in the cloud. (a) True (b) False
  20. 20.💾 Where should the app save a class leaderboard: on the phone or in the cloud? (a) in the cloud (b) on the phone
  21. 21.💾 Where should the app save chat messages to friends: on the phone or in the cloud? (a) in the cloud (b) on the phone
  22. 22.True or false: the sound on/off setting fits saving in the cloud. (a) False (b) True
  23. 23.💾 Where should the app save the sound on/off setting: on the phone or in the cloud? (a) in the cloud (b) on the phone
  24. 24.💾 What does this code show? (Positions start at 0.)
    let notes = ["Art", "Maths", "Sports", "Music", "Science"];
    show(notes[1]);
    (a) Maths (b) Art (c) Music (d) Sports
  25. 25.True or false: your last game level fits saving in the cloud. (a) True (b) False
  26. 26.💾 What does this code show? (Positions start at 0.)
    let notes = ["Music", "Sports", "Science", "Hindi"];
    show(notes[3]);
    (a) Hindi (b) Sports (c) Music (d) Science
  27. 27.💾 What number does this code show?
    let notes = ["Art", "Sports", "Science"];
    notes.push("Maths");
    notes.push("Music");
    show(notes.length);
  28. 28.💾 What number does this code show?
    let points = 3;
    points = points - 1;
    points = points + 3;
    show(points);
  29. 29.💾 Which can hold many values in order? (a) a single number (b) a button (c) a switch (d) a list
  30. 30.💾 What is a variable? (a) a phone setting (b) a named box for a value (c) a type of screen (d) a picture
  31. 31.💾 Which works with no internet at all? (a) a cloud leaderboard (b) data saved on the phone (c) a cloud backup (d) a shared chat
  32. 32.💾 What number does this code show?
    let notes = ["Sports", "Maths", "Music"];
    notes.push("Science");
    notes.push("Art");
    show(notes.length);
  33. 33.💾 pop() takes off the last item. What does this code show?
    let notes = ["Art", "Hindi", "Sports"];
    notes.pop();
    show(notes[notes.length - 1]);
    (a) Hindi (b) Art (c) Sports
  34. 34.True or false: notes to read offline fits saving in the cloud. (a) True (b) False
  35. 35.💾 What does this code show? (Positions start at 0.)
    let songs = ["Ocean", "Kites", "Sunrise", "Stars"];
    show(songs[1]);
    (a) Ocean (b) Kites (c) Sunrise (d) Stars
  36. 36.💾 What number does this code show?
    let coins = 4;
    coins = coins - 4;
    coins = coins + 1;
    show(coins);
  37. 37.True or false: a class leaderboard fits saving on the phone. (a) False (b) True
  38. 38.True or false: photos on two devices fits saving on the phone. (a) True (b) False
  39. 39.💾 What does this code show? (Positions start at 0.)
    let songs = ["Ocean", "Rain", "Monsoon", "Kites", "Sunrise"];
    show(songs[2]);
    (a) Monsoon (b) Ocean (c) Rain (d) Kites
  40. 40.💾 What does this code show? (Positions start at 0.)
    let friends = ["Aman", "Riya", "Kabir", "Zoya", "Meera"];
    show(friends[2]);
    (a) Zoya (b) Kabir (c) Aman (d) Riya

Answer key

  1. in the cloud
  2. use it on any device
  3. on the phone
  4. 1
  5. True
  6. in the cloud
  7. 4
  8. notes to read offline
  9. 6
  10. a draft you are typing
  11. 0
  12. the sound on/off setting
  13. on the phone
  14. Science
  15. 5
  16. a shared to-do list
  17. on the phone
  18. Arjun
  19. True
  20. in the cloud
  21. in the cloud
  22. False
  23. on the phone
  24. Maths
  25. False
  26. Hindi
  27. 5
  28. 5
  29. a list
  30. a named box for a value
  31. data saved on the phone
  32. 5
  33. Hindi
  34. False
  35. Kites
  36. 1
  37. False
  38. False
  39. Monsoon
  40. Kabir

Free app development lessons, practice and worksheets at talentjr.in/app-development-for-students