← App development final test lesson New set →

App Dev Worksheet: Final Test

App development lesson 24: App development final test · Set 239 · 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.🧪 One test case fails. Which one?
    📝 Rule: a quiz is passed with 7 or more right answers.
    function result(right) {
      if (right > 7) {
        return "Pass";
      }
      return "Try again";
    }
    Test 1: result(4) → expected Try again
    Test 2: result(9) → expected Pass
    Test 3: result(7) → expected Pass
    (a) Test 3 (b) Test 2 (c) Test 1
  2. 2.🎯 An app for “everyone” with no clear user usually ___. (a) wins every prize (b) is easy to build (c) needs no testing (d) helps nobody well
  3. 3.⚙️ Which line does the processing (works out the answer)?
    line 1: let bill = 39; // typed by the user
    line 2: let friends = 3; // typed by the user
    line 3: let share = bill / friends;
    line 4: show(share);
    (a) line 3 (b) line 2 (c) line 4 (d) line 1
  4. 4.🔍 Which is the odd one out? (a) spot a problem to solve (b) talk to possible users (c) list what users need (d) try every button
  5. 5.🔀 What number does this shop app show?
    let total = 700;
    if (total > 500) {
      total = total - 50;
    }
    show(total);
  6. 6.🔘 Our rule: buttons are at least 48 px tall. Which button is too small?
    Back button: 28 px tall
    Cancel button: 52 px tall
    Start button: 72 px tall
    (a) Back (b) Start (c) Cancel
  7. 7.Which of these requests is fair? (a) calculator → location (b) torch → contacts (c) timer → your photos (d) map app → location
  8. 8.🔘 Our rule: buttons are at least 48 px tall. How many of these buttons follow the rule?
    Send button: 64 px tall
    Cancel button: 40 px tall
    Next button: 64 px tall
  9. 9.True or false: a medicine reminder solves no real problem. (a) True (b) False
  10. 10.💾 Where should the app save your last game level: on the phone or in the cloud? (a) in the cloud (b) on the phone
  11. 11.🗒️ You are planning version 1 of a pocket-money tracker. Which feature can WAIT for a later version? (a) pie-chart colours (b) show the balance (c) add money received (d) add money spent
  12. 12.🧰 What number does this code show?
    function double(n) {
      return n * 2;
    }
    show(double(15));
  13. 13.True or false: buttons almost touching is good button design. (a) True (b) False
  14. 14.🐞 A comment in code (after //) is for ___. (a) the phone screen (b) people reading the code (c) the app store (d) the battery
  15. 15.Which of these is a user need? (a) a dark mode switch (b) a share button (c) “What should I cook?” (d) a reminder alarm
  16. 16.📱 Which one has a home-screen icon: an app or a website? (a) an app (b) a website
  17. 17.🔁 What does a loop do? (a) repeats code (b) saves photos (c) deletes code (d) draws icons
  18. 18.🧰 What does this code show?
    function greet(name) {
      return "Hi, " + name + "!";
    }
    show(greet("Meera"));
    (a) greet (b) Hi, name! (c) Meera (d) Hi, Meera!
  19. 19.🔁 What number does this code show?
    let marks = [13, 7, 18, 13, 6];
    let best = 0;
    for (let i = 0; i < marks.length; i++) {
      if (marks[i] > best) {
        best = marks[i];
      }
    }
    show(best);
  20. 20.🔘 Is this good or poor button design: a big, easy tap area? (a) poor design (b) good design
  21. 21.🌐 Which program do you need to open a website? (a) a calculator (b) a web browser (c) a camera app (d) an app store
  22. 22.✏️ What is a wireframe? (a) the finished app (b) a simple screen sketch (c) a type of password (d) a charging cable
  23. 23.💡 Does an app idea like a library due-date alert solve a real problem? (a) Yes (b) No
  24. 24.🗒️ Version 1 of a bus tracker must be ready in 10 days. How many days are left for extras after the must-haves?
    see where the bus is: 1 days
    show arrival time: 4 days
    pick your bus stop: 4 days
  25. 25.🔍 Which is the odd one out? (a) how many taps it takes (b) how users feel after (c) how easy sign-up is (d) the screen layout
  26. 26.🔀 What does this PIN rule show?
    let pin = "73697";
    if (pin.length === 4) {
      show("PIN saved");
    } else {
      show("Use 4 digits");
    }
    (a) PIN saved (b) Use 4 digits
  27. 27.🧪 How many of these test cases pass?
    🎟️ Rule: a ticket costs 50 for children under 11, and 100 for everyone else.
    function price(age) {
      if (age <= 11) {
        return 50;
      }
      return 100;
    }
    Test 1: price(13) → expected 100
    Test 2: price(8) → expected 50
    Test 3: price(12) → expected 100
  28. 28.👆 The user taps the button 3 times. What number does the label show now?
    let stars = 6;
    button.onTap = function () {
      stars = stars + 4;
      label.text = stars;
    };
  29. 29.🧰 What number does this code show?
    function triple(n) {
      return n * 3;
    }
    show(triple(21));
  30. 30.🔀 When does the else part run? (a) never (b) when the test is true (c) always (d) when the test is false
  31. 31.🔀 What number does this shop app show?
    let total = 390;
    if (total > 500) {
      total = total - 50;
    }
    show(total);
  32. 32.🐞 Each comment says what its line SHOULD do. Which line has the bug?
    line 1: let score = 38; // start at 38
    line 2: score = score * 3; // double it
    line 3: score = score + 3; // add 3
    line 4: show(score); // show it
    (a) line 1 (b) line 3 (c) line 2
  33. 33.True or false: speaking a command is processing. (a) False (b) True
  34. 34.🔐 Is this permission request fair or too much: calling app → contacts? (a) too much (b) fair
  35. 35.🔁 What number does this code show?
    let scores = [57, 10, 18];
    let count = 0;
    for (let i = 0; i < scores.length; i++) {
      if (scores[i] >= 60) {
        count = count + 1;
      }
    }
    show(count);
  36. 36.Which of these is true of a website? (a) comes from an app store (b) has a home-screen icon (c) is installed on a phone (d) needs no installing
  37. 37.🔀 What does this sign-up rule show?
    let age = 11;
    if (age >= 13) {
      show("Welcome!");
    } else {
      show("Ask a parent");
    }
    (a) Ask a parent (b) Welcome!
  38. 38.⚙️ In an app, is tapping a button an input, processing or an output? (a) input (b) processing (c) output
  39. 39.🔀 What does this battery rule show?
    let battery = 57;
    if (battery < 20) {
      show("Low battery");
    } else {
      show("Battery OK");
    }
    (a) Low battery (b) Battery OK
  40. 40.⚙️ What number does this app show?
    let price = 40; // typed by the user
    let qty = 6; // typed by the user
    let total = price * qty;
    show(total);

Answer key

  1. Test 3
  2. helps nobody well
  3. line 3
  4. try every button
  5. 650
  6. Back
  7. map app → location
  8. 2
  9. False
  10. on the phone
  11. pie-chart colours
  12. 30
  13. False
  14. people reading the code
  15. “What should I cook?”
  16. an app
  17. repeats code
  18. Hi, Meera!
  19. 18
  20. good design
  21. a web browser
  22. a simple screen sketch
  23. Yes
  24. 1
  25. the screen layout
  26. Use 4 digits
  27. 3
  28. 18
  29. 63
  30. when the test is false
  31. 390
  32. line 2
  33. False
  34. fair
  35. 0
  36. needs no installing
  37. Ask a parent
  38. input
  39. Battery OK
  40. 240

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