App Dev Worksheet: Final Test
Developer's tip (Plan, design, build, check): Find the topic: what apps are, designing apps, or logic and building. Read every screen, list or code line carefully, top to bottom. For code, write each value down step by step and check it again.
NameDateTime takenScore ___ / 40
-
1.⚙️ Which line does the processing (works out the answer)?
line 1: let price = 30; // typed by the user
line 2: let qty = 5; // typed by the user
line 3: let total = price * qty;
line 4: show(total); (a) line 2 (b) line 1 (c) line 3 (d) line 4 - 2.🔀 What does >= mean? (a) less than (b) greater than or equal (c) smaller or equal (d) not equal
-
3.🧪 How many of these test cases pass?
🎟️ Rule: a ticket costs 50 for children under 9, and 100 for everyone else.
function price(age) {
if (age <= 9) {
return 50;
}
return 100;
}
Test 1: price(15) → expected 100
Test 2: price(7) → expected 50
Test 3: price(16) → expected 100 -
4.🐞 Each comment says what its line SHOULD do. Which line has the bug?
line 1: let lives = 42; // start at 39
line 2: lives = lives + 4; // add 4
line 3: lives = lives + 6; // add 6
line 4: lives = lives * 2; // double it
line 5: show(lives); // show it (a) line 1 (b) line 4 (c) line 3 (d) line 2 -
5.🧰 A museum app works out the entry fee. What number does this code show?
function fee(age) {
if (age < 5) {
return 0;
}
return 50;
}
show(fee(11) + fee(3)); - 6.🎯 Is this a user need or a feature: “I keep missing the bus”? (a) a feature (b) a user need
-
7.🔀 Which badge does this quiz app show?
let marks = 58;
if (marks >= 80) {
show("Gold");
} else if (marks >= 50) {
show("Silver");
} else {
show("Bronze");
} (a) Bronze (b) Gold (c) Silver -
8.🔁 What is the LAST line this code shows?
let names = ["Zoya", "Meera", "Arjun", "Aman"];
for (let i = 0; i < names.length; i++) {
show("Hi, " + names[i]);
} (a) Hi, Arjun (b) Hi, Meera (c) Hi, Zoya (d) Hi, Aman - 9.🔁 Why use a loop to show 100 messages? (a) it hides them (b) it uses more lines (c) less code to write (d) it is slower
-
10.🔁 What is the LAST line this code shows?
let names = ["Zoya", "Kabir", "Meera", "Arjun"];
for (let i = 0; i < names.length; i++) {
show("Hi, " + names[i]);
} (a) Hi, Arjun (b) Hi, Zoya (c) Hi, Kabir (d) Hi, Meera -
11.🧭 The app has tabs Home, Search, Profile. You start on Home, then:
1. open “Edit photo”
2. tap Back
3. open “Video”
Which screen are you on now? (a) Video (b) Edit photo (c) Search (d) Home -
12.🧰 A museum app works out the entry fee. What number does this code show?
function fee(age) {
if (age < 5) {
return 0;
}
return 40;
}
show(fee(2) + fee(10)); - 13.Which of these fits saving on the phone? (a) chat messages to friends (b) a class leaderboard (c) notes to read offline (d) photos on two devices
-
14.🧰 What number does this code show?
function total(price, qty) {
return price * qty;
}
show(total(75, 6)); - 15.🎯 Is this a user need or a feature: a search bar? (a) a user need (b) a feature
- 16.🗒️ A to-do app with no “add a task” feature is ___. (a) missing a must-have (b) well planned (c) a nice extra (d) ready to release
- 17.True or false: a 5-minute alarm ends is a text event. (a) True (b) False
- 18.🔘 Our rule: buttons are at least 48 px tall. The Next button is 24 px tall. How many px taller must it be?
-
19.🧪 One test case fails. Which one?
🎟️ Rule: a ticket costs 50 for children under 8, and 100 for everyone else.
function price(age) {
if (age <= 8) {
return 50;
}
return 100;
}
Test 1: price(7) → expected 50
Test 2: price(14) → expected 100
Test 3: price(8) → expected 100 (a) Test 2 (b) Test 1 (c) Test 3 -
20.📊 Survey: which problem bugs you most? How many more votes did “no quiet study place” get than “missing the bus”?
no quiet study place: 6 votes
missing the bus: 3 votes
losing water bottles: 17 votes -
21.🔀 What number does this shop app show?
let total = 760;
if (total > 500) {
total = total - 50;
}
show(total); - 22.🐞 What is a bug? (a) a nice icon (b) a new feature (c) a fast phone (d) a mistake in the code
-
23.🧰 What does this code show?
function greet(name) {
return "Welcome, " + name + "!";
}
show(greet("Kabir")); (a) Welcome, name! (b) Kabir (c) greet (d) Welcome, Kabir! - 24.Which of these makes the app harder to use? (a) big touch targets (b) labels on every icon (c) strong colour contrast (d) icons with no labels
- 25.Which of these is an input? (a) adding up a bill (b) sorting the scores (c) typing your age (d) checking a password
-
26.🧪 One test case fails. Which one?
🎟️ Rule: a ticket costs 50 for children under 13, and 100 for everyone else.
function price(age) {
if (age <= 13) {
return 50;
}
return 100;
}
Test 1: price(18) → expected 100
Test 2: price(12) → expected 50
Test 3: price(13) → expected 100 (a) Test 3 (b) Test 1 (c) Test 2 -
27.🧭 The app has tabs Lessons, Quiz, Me. You start on Lessons, then:
1. tap the Quiz tab
2. open “Badges”
3. tap the Me tab
4. tap the Me tab
Which screen are you on now? (a) Quiz (b) Me (c) Lessons (d) Badges - 28.Which of these is true of a menu button? (a) hides extra links (b) sits at the bottom (c) undoes one move (d) switches main sections
-
29.🔁 What number does this code show?
let runs = [18, 6, 10, 14, 1];
let total = 0;
for (let i = 0; i < runs.length; i++) {
total = total + runs[i];
}
show(total); - 30.True or false: adding up a bill is an output. (a) False (b) True
- 31.Which of these is true of a tab bar? (a) switches main sections (b) undoes one move (c) opens a list of pages (d) goes to the last screen
- 32.👥 A school app has 190 students, 85 teachers and 65 parents as users. How many more students than parents are there?
- 33.💡 Which app idea solves this problem: a team shares one snack bill? (a) a lost-and-found board (b) a medicine reminder (c) a homework planner (d) a bill splitter
- 34.Which colour pair is easy to read? (a) red on green (b) yellow on white (c) dark blue on white (d) light grey on white
-
35.🧭 The app has tabs Home, Search, Profile. You start on Home, then:
1. open “Match report”
2. open “Match report”
3. open “Help page”
4. open “Friend list”
How many times must you tap Back to reach the main screen of this tab? - 36.🔀 A screen with no way forward or back is called a ___. (a) home screen (b) tab bar (c) dead end (d) shortcut
-
37.🔀 What does this sign-up rule show?
let age = 14;
if (age >= 13) {
show("Welcome!");
} else {
show("Ask a parent");
} (a) Ask a parent (b) Welcome! -
38.👆 The user types Meera in nameBox and taps the button 1 time. What does the label show?
button.onTap = function () {
label.text = "Hello, " + nameBox.text + "!";
}; (a) Meera (b) Hello, Meera! (c) Hello! (d) Hello, nameBox.text! -
39.🚀 Which of these versions is the OLDEST?
4.11.4, 4.7.6, 4.3.6, 3.23.8 (a) 3.23.8 (b) 4.7.6 (c) 4.3.6 (d) 4.11.4 - 40.🔢 In a quiz-app flow, what comes right after “read a question”? (a) tap “Start quiz” (b) pick an answer (c) see the final score (d) see if it is right
Answer key
- line 3
- greater than or equal
- 3
- line 1
- 50
- a user need
- Silver
- Hi, Aman
- less code to write
- Hi, Arjun
- Video
- 40
- notes to read offline
- 450
- a feature
- missing a must-have
- False
- 24
- Test 3
- 3
- 710
- a mistake in the code
- Welcome, Kabir!
- icons with no labels
- typing your age
- Test 3
- Me
- hides extra links
- 49
- False
- switches main sections
- 125
- a bill splitter
- dark blue on white
- 4
- dead end
- Welcome!
- Hello, Meera!
- 3.23.8
- pick an answer
Free app development lessons, practice and worksheets at talentjr.in/app-development-for-students