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