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.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.💾 What number does this code show?
let points = 6;
points = points - 1;
points = points + 3;
show(points); - 3.True or false: a draft you are typing fits saving on the phone. (a) True (b) False
- 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.💾 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.💾 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.💾 What number does this code show?
let score = 6;
score = score - 2;
score = score + 1;
show(score); - 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.💾 Where should the app save a class leaderboard: on the phone or in the cloud? (a) in the cloud (b) on the phone
- 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.True or false: notes to read offline fits saving on the phone. (a) False (b) True
- 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.💾 What number does this code show?
let lives = 3;
lives = lives - 3;
lives = lives + 5;
show(lives); - 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 number does this code show?
let coins = 6;
coins = coins - 1;
coins = coins + 2;
show(coins); - 16.True or false: a class leaderboard fits saving in the cloud. (a) False (b) True
-
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.💾 What number does this code show?
let friends = ["Riya", "Zoya", "Arjun", "Kabir"];
friends.push("Aman");
friends.push("Meera");
show(friends.length); -
19.💾 What number does this code show?
let friends = ["Arjun", "Aman", "Meera"];
friends.push("Zoya");
show(friends.length); -
20.💾 What number does this code show?
let friends = ["Kabir", "Zoya", "Arjun", "Meera"];
friends.push("Riya");
show(friends.length); -
21.💾 What number does this code show?
let friends = ["Riya", "Meera"];
friends.push("Arjun");
show(friends.length); - 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.💾 What number does this code show?
let coins = 3;
coins = coins - 1;
coins = coins + 2;
show(coins); - 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.💾 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.💾 What number does this code show?
let friends = ["Aman", "Kabir"];
friends.push("Zoya");
friends.push("Meera");
show(friends.length); -
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.True or false: a shared to-do list fits saving in the cloud. (a) True (b) False
- 29.True or false: your last game level fits saving in the cloud. (a) True (b) False
- 30.True or false: photos on two devices fits saving in the cloud. (a) True (b) False
-
31.💾 What number does this code show?
let friends = ["Meera", "Aman"];
friends.push("Kabir");
show(friends.length); - 32.True or false: the sound on/off setting fits saving on the phone. (a) True (b) False
- 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.💾 What number does this code show?
let friends = ["Zoya", "Arjun", "Riya", "Aman"];
friends.push("Meera");
friends.push("Kabir");
show(friends.length); -
35.💾 What number does this code show?
let songs = ["Sunrise", "Rain"];
songs.push("Monsoon");
songs.push("Ocean");
show(songs.length); - 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.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.💾 What does this code show? (Positions start at 0.)
let songs = ["Ocean", "Kites", "Rain"];
show(songs[1]); (a) Ocean (b) Kites (c) Rain - 39.True or false: the sound on/off setting fits saving in the cloud. (a) False (b) True
-
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
- a shared to-do list
- 8
- True
- use it on any device
- the phone is lost
- on the phone
- 5
- notes to read offline
- in the cloud
- chat messages to friends
- True
- on the phone
- 5
- in the cloud
- 7
- True
- Kabir
- 6
- 4
- 5
- 3
- your last game level
- 4
- a draft you are typing
- in the cloud
- 4
- Maths
- True
- False
- True
- 3
- True
- on the phone
- 6
- 4
- photos on two devices
- a class leaderboard
- Kites
- False
- Arjun
Free app development lessons, practice and worksheets at talentjr.in/app-development-for-students