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

Answer key

  1. True
  2. data saved on the phone
  3. 2
  4. a shared to-do list
  5. a class leaderboard
  6. a list
  7. Meera
  8. True
  9. on the phone
  10. 8
  11. a named box for a value
  12. 4
  13. False
  14. True
  15. False
  16. in the cloud
  17. False
  18. the sound on/off setting
  19. False
  20. in the cloud
  21. on the phone
  22. photos on two devices
  23. 5
  24. 9
  25. the phone is lost
  26. True
  27. your last game level
  28. Kites
  29. on the phone
  30. Art
  31. 11
  32. use it on any device
  33. 4
  34. chat messages to friends
  35. False
  36. Art
  37. True
  38. 0
  39. 3
  40. 8

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