← App development final test lesson New set →

App Dev Worksheet: Final Test

App development lesson 24: App development final test · Set 186 · 40 questions
TalentJR

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. 1.🐞 Each comment says what its line SHOULD do. Which line has the bug?
    line 1: let lives = 42; // start at 42
    line 2: lives = lives + 2; // add 2
    line 3: lives = lives - 3; // take away 3
    line 4: lives = lives + 2; // double it
    line 5: show(lives); // show it
    (a) line 4 (b) line 3 (c) line 2 (d) line 1
  2. 2.🐞 Each comment says what its line SHOULD do. Which line has the bug?
    line 1: let score = 40; // start at 40
    line 2: score = score - 3; // take away 3
    line 3: score = score + 5; // add 5
    line 4: score = score + 2; // double it
    line 5: show(score); // show it
    (a) line 4 (b) line 1 (c) line 2 (d) line 3
  3. 3.💡 Does an app idea like a lost-and-found board solve a real problem? (a) No (b) Yes
  4. 4.True or false: space between buttons is good button design. (a) False (b) True
  5. 5.🧭 Which part of navigation undoes one move? (a) the back button (b) a menu button (c) a tab bar
  6. 6.🧩 In an app, what is tap to Send? (a) a button (b) an input (c) a screen (d) data
  7. 7.🐞 This code has a bug. What number does it ACTUALLY show?
    line 1: let score = 32; // start at 32
    line 2: score = score + 8; // add 5
    line 3: score = score - 3; // take away 3
    line 4: score = score + 5; // add 5
    line 5: show(score); // show it
  8. 8.🔁 What number does this code show?
    let steps = [42, 90, 23, 80];
    let count = 0;
    for (let i = 0; i < steps.length; i++) {
      if (steps[i] >= 60) {
        count = count + 1;
      }
    }
    show(count);
  9. 9.True or false: a step counter is a game. (a) True (b) False
  10. 10.🧪 What is the ACTUAL result of Test 3?
    🎟️ 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(12) → expected 100
    Test 2: price(14) → expected 100
    Test 3: price(4) → expected 50
  11. 11.🔁 What number does this code show?
    let runs = [16, 20, 9];
    let total = 0;
    for (let i = 0; i < runs.length; i++) {
      total = total + runs[i];
    }
    show(total);
  12. 12.✏️ Why draw a wireframe before coding? (a) it runs the app (b) it saves data (c) it adds colours (d) changes are quick
  13. 13.🧪 What is the actual result of a test? (a) the app’s name (b) what the app really does (c) the test’s number (d) what we hope for
  14. 14.⚙️ What number does this app show?
    let price = 85; // typed by the user
    let qty = 5; // typed by the user
    let total = price * qty;
    show(total);
  15. 15.True or false: you spot a problem to solve at the plan stage. (a) False (b) True
  16. 16.👆 What kind of event is this: the screen first opens? (a) a text event (b) a load event (c) a timer event (d) a tap event
  17. 17.👆 The user taps the button 3 times. What number does the label show now?
    let likes = 0;
    button.onTap = function () {
      if (likes < 5) {
        likes = likes + 1;
      }
      label.text = likes;
    };
  18. 18.True or false: the screen first opens is a tap event. (a) True (b) False
  19. 19.True or false: the font size is about UI (the look). (a) False (b) True
  20. 20.⚙️ Which line does the processing (works out the answer)?
    line 1: let bill = 235; // typed by the user
    line 2: let friends = 5; // typed by the user
    line 3: let share = bill / friends;
    line 4: show(share);
    (a) line 4 (b) line 2 (c) line 1 (d) line 3
  21. 21.🔁 What does a loop do? (a) deletes code (b) repeats code (c) saves photos (d) draws icons
  22. 22.🧰 What number does this code show?
    function total(price, qty) {
      return price * qty;
    }
    show(total(10, 6));
  23. 23.🚀 Your app is at version 2.11.1. The next release fixes a small bug. What is its version number? (a) 3.0.0 (b) 2.11.2 (c) 2.12.1 (d) 2.12.0
  24. 24.Which of these is true of a website? (a) needs no installing (b) comes from an app store (c) has a home-screen icon (d) is installed on a phone
  25. 25.🔍 Which is the odd one out? (a) the button colours (b) how fast a task is done (c) whether users get lost (d) how easy sign-up is
  26. 26.💾 What number does this code show?
    let lives = 4;
    lives = lives - 1;
    lives = lives + 5;
    show(lives);
  27. 27.⚙️ In an app, is tapping a button an input, processing or an output? (a) processing (b) input (c) output
  28. 28.True or false: a website has a home-screen icon. (a) True (b) False
  29. 29.Which of these is a screen? (a) a slider for volume (b) your saved notes (c) tap to go Next (d) the settings page
  30. 30.🔁 What number does this code show?
    let steps = [2, 20, 2, 1];
    let total = 0;
    for (let i = 0; i < steps.length; i++) {
      total = total + steps[i];
    }
    show(total);
  31. 31.🔀 What does this PIN rule show?
    let pin = "7960";
    if (pin.length === 4) {
      show("PIN saved");
    } else {
      show("Use 4 digits");
    }
    (a) Use 4 digits (b) PIN saved
  32. 32.🧪 What is the ACTUAL result of Test 2?
    🚚 Rule: delivery is free (0) when the order is 500 or more; otherwise it costs 40.
    function delivery(total) {
      if (total > 500) {
        return 0;
      }
      return 40;
    }
    Test 1: delivery(300) → expected 40
    Test 2: delivery(650) → expected 0
    Test 3: delivery(500) → expected 0
  33. 33.True or false: a puzzle with levels is a tool app. (a) False (b) True
  34. 34.💾 What number does this code show?
    let songs = ["Kites", "Rain"];
    songs.push("Monsoon");
    songs.push("Stars");
    show(songs.length);
  35. 35.🔢 In a food-order flow, which comes first: “track the order” or “pay for the order”? (a) track the order (b) pay for the order
  36. 36.🐞 Each comment says what its line SHOULD do. Which line has the bug?
    line 1: let stars = 40; // start at 37
    line 2: stars = stars * 2; // double it
    line 3: stars = stars * 2; // double it
    line 4: show(stars); // show it
    (a) line 1 (b) line 2 (c) line 3
  37. 37.True or false: the app starts up is a tap event. (a) True (b) False
  38. 38.🐞 This code has a bug. What number SHOULD it show, if every line did what its comment says?
    line 1: let stars = 35; // start at 33
    line 2: stars = stars - 5; // take away 5
    line 3: stars = stars * 2; // double it
    line 4: show(stars); // show it
  39. 39.💡 Does an app idea like a library due-date alert solve a real problem? (a) No (b) Yes
  40. 40.⚙️ Which line does the processing (works out the answer)?
    line 1: let bill = 120; // typed by the user
    line 2: let friends = 2; // typed by the user
    line 3: let share = bill / friends;
    line 4: show(share);
    (a) line 4 (b) line 2 (c) line 3 (d) line 1

Answer key

  1. line 4
  2. line 4
  3. Yes
  4. True
  5. the back button
  6. a button
  7. 42
  8. 2
  9. False
  10. 50
  11. 45
  12. changes are quick
  13. what the app really does
  14. 425
  15. False
  16. a load event
  17. 3
  18. False
  19. True
  20. line 3
  21. repeats code
  22. 60
  23. 2.11.2
  24. needs no installing
  25. the button colours
  26. 8
  27. input
  28. False
  29. the settings page
  30. 25
  31. PIN saved
  32. 0
  33. False
  34. 4
  35. pay for the order
  36. line 1
  37. False
  38. 56
  39. Yes
  40. line 3

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