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

Answer key

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

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