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

Answer key

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

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