← 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 587 · 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.Which of these fits saving in the cloud? (a) a shared to-do list (b) a draft you are typing (c) the sound on/off setting (d) notes to read offline
  2. 2.💾 What number does this code show?
    let points = 6;
    points = points - 1;
    points = points + 3;
    show(points);
  3. 3.True or false: a draft you are typing fits saving on the phone. (a) True (b) False
  4. 4.💾 Saving data in the cloud lets you ___. (a) skip the internet (b) use it on any device (c) never need a password (d) shrink the app
  5. 5.💾 Data saved only on the phone is lost when ___. (a) the phone is lost (b) you send a message (c) the app is closed (d) the screen turns off
  6. 6.💾 Where should the app save the sound on/off setting: on the phone or in the cloud? (a) on the phone (b) in the cloud
  7. 7.💾 What number does this code show?
    let score = 6;
    score = score - 2;
    score = score + 1;
    show(score);
  8. 8.Which of these fits saving on the phone? (a) chat messages to friends (b) photos on two devices (c) notes to read offline (d) a shared to-do list
  9. 9.💾 Where should the app save a class leaderboard: on the phone or in the cloud? (a) in the cloud (b) on the phone
  10. 10.Which of these fits saving in the cloud? (a) chat messages to friends (b) your last game level (c) notes to read offline (d) the sound on/off setting
  11. 11.True or false: notes to read offline fits saving on the phone. (a) False (b) True
  12. 12.💾 Where should the app save your last game level: on the phone or in the cloud? (a) in the cloud (b) on the phone
  13. 13.💾 What number does this code show?
    let lives = 3;
    lives = lives - 3;
    lives = lives + 5;
    show(lives);
  14. 14.💾 Where should the app save chat messages to friends: on the phone or in the cloud? (a) on the phone (b) in the cloud
  15. 15.💾 What number does this code show?
    let coins = 6;
    coins = coins - 1;
    coins = coins + 2;
    show(coins);
  16. 16.True or false: a class leaderboard fits saving in the cloud. (a) False (b) True
  17. 17.💾 What does this code show? (Positions start at 0.)
    let friends = ["Zoya", "Aman", "Kabir"];
    show(friends[2]);
    (a) Kabir (b) Aman (c) Zoya
  18. 18.💾 What number does this code show?
    let friends = ["Riya", "Zoya", "Arjun", "Kabir"];
    friends.push("Aman");
    friends.push("Meera");
    show(friends.length);
  19. 19.💾 What number does this code show?
    let friends = ["Arjun", "Aman", "Meera"];
    friends.push("Zoya");
    show(friends.length);
  20. 20.💾 What number does this code show?
    let friends = ["Kabir", "Zoya", "Arjun", "Meera"];
    friends.push("Riya");
    show(friends.length);
  21. 21.💾 What number does this code show?
    let friends = ["Riya", "Meera"];
    friends.push("Arjun");
    show(friends.length);
  22. 22.Which of these fits saving on the phone? (a) your last game level (b) photos on two devices (c) a class leaderboard (d) a shared to-do list
  23. 23.💾 What number does this code show?
    let coins = 3;
    coins = coins - 1;
    coins = coins + 2;
    show(coins);
  24. 24.Which of these fits saving on the phone? (a) a draft you are typing (b) a class leaderboard (c) a shared to-do list (d) photos on two devices
  25. 25.💾 Where should the app save photos on two devices: on the phone or in the cloud? (a) in the cloud (b) on the phone
  26. 26.💾 What number does this code show?
    let friends = ["Aman", "Kabir"];
    friends.push("Zoya");
    friends.push("Meera");
    show(friends.length);
  27. 27.💾 What does this code show? (Positions start at 0.)
    let notes = ["Maths", "Art", "Hindi", "Science", "Sports"];
    show(notes[0]);
    (a) Art (b) Hindi (c) Science (d) Maths
  28. 28.True or false: a shared to-do list fits saving in the cloud. (a) True (b) False
  29. 29.True or false: your last game level fits saving in the cloud. (a) True (b) False
  30. 30.True or false: photos on two devices fits saving in the cloud. (a) True (b) False
  31. 31.💾 What number does this code show?
    let friends = ["Meera", "Aman"];
    friends.push("Kabir");
    show(friends.length);
  32. 32.True or false: the sound on/off setting fits saving on the phone. (a) True (b) False
  33. 33.💾 Where should the app save a draft you are typing: on the phone or in the cloud? (a) on the phone (b) in the cloud
  34. 34.💾 What number does this code show?
    let friends = ["Zoya", "Arjun", "Riya", "Aman"];
    friends.push("Meera");
    friends.push("Kabir");
    show(friends.length);
  35. 35.💾 What number does this code show?
    let songs = ["Sunrise", "Rain"];
    songs.push("Monsoon");
    songs.push("Ocean");
    show(songs.length);
  36. 36.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) photos on two devices
  37. 37.Which of these fits saving in the cloud? (a) a draft you are typing (b) a class leaderboard (c) notes to read offline (d) your last game level
  38. 38.💾 What does this code show? (Positions start at 0.)
    let songs = ["Ocean", "Kites", "Rain"];
    show(songs[1]);
    (a) Ocean (b) Kites (c) Rain
  39. 39.True or false: the sound on/off setting fits saving in the cloud. (a) False (b) True
  40. 40.💾 What does this code show? (Positions start at 0.)
    let friends = ["Meera", "Kabir", "Arjun", "Zoya", "Riya"];
    show(friends[2]);
    (a) Zoya (b) Arjun (c) Meera (d) Kabir

Answer key

  1. a shared to-do list
  2. 8
  3. True
  4. use it on any device
  5. the phone is lost
  6. on the phone
  7. 5
  8. notes to read offline
  9. in the cloud
  10. chat messages to friends
  11. True
  12. on the phone
  13. 5
  14. in the cloud
  15. 7
  16. True
  17. Kabir
  18. 6
  19. 4
  20. 5
  21. 3
  22. your last game level
  23. 4
  24. a draft you are typing
  25. in the cloud
  26. 4
  27. Maths
  28. True
  29. False
  30. True
  31. 3
  32. True
  33. on the phone
  34. 6
  35. 4
  36. photos on two devices
  37. a class leaderboard
  38. Kites
  39. False
  40. Arjun

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