← App development final test lesson New set →

App Dev Worksheet: Final Test

App development lesson 24: App development final test · Set 403 · 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.🧪 What is the ACTUAL result of Test 3?
    🚚 Rule: delivery is free (0) when the order is 300 or more; otherwise it costs 40.
    function delivery(total) {
      if (total > 300) {
        return 0;
      }
      return 40;
    }
    Test 1: delivery(250) → expected 40
    Test 2: delivery(650) → expected 0
    Test 3: delivery(600) → expected 0
  2. 2.🧰 A museum app works out the entry fee. What number does this code show?
    function fee(age) {
      if (age < 5) {
        return 0;
      }
      return 30;
    }
    show(fee(5) + fee(1));
  3. 3.True or false: you let friends try it at the idea stage. (a) False (b) True
  4. 4.👆 The user taps the button 5 times. What does the label show now?
    let on = false;
    button.onTap = function () {
      on = !on;
      if (on) {
        label.text = "ON";
      } else {
        label.text = "OFF";
      }
    };
    (a) ON (b) OFF
  5. 5.🔘 Our rule: buttons are at least 48 px tall. How many of these buttons follow the rule?
    Back button: 44 px tall
    Next button: 44 px tall
    Help button: 32 px tall
  6. 6.🧭 Tapping a tab usually takes you to ___. (a) that tab’s main screen (b) a random page (c) the last app used (d) the phone settings
  7. 7.🔀 What number does this shop app show?
    let total = 780;
    if (total > 500) {
      total = total - 50;
    }
    show(total);
  8. 8.🐞 Each comment says what its line SHOULD do. Which line has the bug?
    line 1: let score = 35; // start at 35
    line 2: score = score + 3; // take away 3
    line 3: score = score * 2; // double it
    line 4: show(score); // show it
    (a) line 2 (b) line 3 (c) line 1
  9. 9.🧩 Which input is best for choosing a volume level? (a) a switch (b) a text box (c) a title (d) a slider
  10. 10.True or false: working out a tip is an input. (a) True (b) False
  11. 11.🎯 Is this a user need or a feature: “I forget my homework”? (a) a feature (b) a user need
  12. 12.🧪 How many of these test cases pass?
    📝 Rule: a quiz is passed with 5 or more right answers.
    function result(right) {
      if (right >= 5) {
        return "Pass";
      }
      return "Try again";
    }
    Test 1: result(7) → expected Pass
    Test 2: result(5) → expected Pass
    Test 3: result(3) → expected Try again
  13. 13.💾 What does this code show? (Positions start at 0.)
    let songs = ["Sunrise", "Stars", "Ocean", "Kites"];
    show(songs[2]);
    (a) Sunrise (b) Stars (c) Ocean (d) Kites
  14. 14.🔀 With if / else if / else, how many parts run? (a) all of them (b) none (c) two (d) only one
  15. 15.📱 Which one updates from the store: an app or a website? (a) a website (b) an app
  16. 16.💾 Where should the app save a class leaderboard: on the phone or in the cloud? (a) on the phone (b) in the cloud
  17. 17.📊 Survey: which problem bugs you most? How many students voted in all?
    losing water bottles: 24 votes
    forgetting homework: 3 votes
    missing the bus: 18 votes
  18. 18.🔢 In a quiz-app flow, what comes right after “tap “Start quiz””? (a) pick an answer (b) see the final score (c) read a question (d) see if it is right
  19. 19.🔢 In a photo-post flow, which comes first: “write a caption” or “take the photo”? (a) write a caption (b) take the photo
  20. 20.👆 The user taps the button 2 times. What number does the label show now?
    let likes = 0;
    button.onTap = function () {
      if (likes < 3) {
        likes = likes + 1;
      }
      label.text = likes;
    };
  21. 21.🧪 What is the ACTUAL result of Test 3?
    🚚 Rule: delivery is free (0) when the order is 600 or more; otherwise it costs 40.
    function delivery(total) {
      if (total > 600) {
        return 0;
      }
      return 40;
    }
    Test 1: delivery(550) → expected 40
    Test 2: delivery(650) → expected 0
    Test 3: delivery(600) → expected 0
  22. 22.🧭 The app has tabs Home, Search, Profile. You start on Home, then:
    1. open “Score card”
    2. tap Back
    3. open “Edit photo”
    4. tap the Home tab
    Which screen are you on now?
    (a) Edit photo (b) Home (c) Score card (d) Search
  23. 23.🔀 What does if / else let an app do? (a) repeat forever (b) save a photo (c) pick one of two actions (d) draw a screen
  24. 24.🧪 A test case is an input together with its ___. (a) font size (b) app icon (c) screen colour (d) expected result
  25. 25.🗒️ You are planning version 1 of a homework planner. Which feature is a MUST-HAVE? (a) pick a theme colour (b) share tasks to friends (c) set a due date (d) earn stickers
  26. 26.Which of these is true of an app? (a) has a web address (b) opens from a link (c) is installed on a phone (d) opens in a web browser
  27. 27.🔀 What does this sign-up rule show?
    let age = 14;
    if (age >= 13) {
      show("Welcome!");
    } else {
      show("Ask a parent");
    }
    (a) Welcome! (b) Ask a parent
  28. 28.🐞 Each comment says what its line SHOULD do. Which line has the bug?
    line 1: let stars = 36; // start at 35
    line 2: stars = stars + 3; // add 3
    line 3: stars = stars + 4; // add 4
    line 4: stars = stars + 3; // add 3
    line 5: show(stars); // show it
    (a) line 2 (b) line 3 (c) line 4 (d) line 1
  29. 29.🧩 How many inputs (text boxes, switches and sliders) does this screen have?
    [title] Sign Up
    [text box] Subject
    [switch] Dark mode
    [text box] Email
    [button] Done
    [text box] Name
  30. 30.🔀 A screen with no way forward or back is called a ___. (a) tab bar (b) shortcut (c) home screen (d) dead end
  31. 31.⚙️ What number does this app show?
    let price = 510; // typed by the user
    let off = 40; // typed by the user
    let pay = price - off;
    show(pay);
  32. 32.🐞 This code has a bug. What number SHOULD it show, if every line did what its comment says?
    line 1: let lives = 49; // start at 49
    line 2: lives = lives * 2; // double it
    line 3: lives = lives + 4; // take away 4
    line 4: show(lives); // show it
  33. 33.🔘 Our rule: buttons are at least 48 px tall. The Back button is 40 px tall. How many px taller must it be?
  34. 34.🧰 What is a function? (a) a screen size (b) a type of phone (c) a list of colours (d) a named block of code
  35. 35.🎯 Why learn about users before you build? (a) to slow it down (b) to pick a logo (c) to make it longer (d) to build what they need
  36. 36.Which of these is a button? (a) tap to Send (b) your friends list (c) your high score (d) the log-in page
  37. 37.🔢 After an app is released, which comes first: “release an update” or “test it again”? (a) test it again (b) release an update
  38. 38.True or false: a bus tracker is the best fit for a student who often misses the school bus. (a) False (b) True
  39. 39.🧩 Which of these is a button on this screen?
    [title] Order Snacks
    [button] Cancel
    [button] Next
    [slider] Brightness
    [text box] Due date
    (a) Brightness (b) Due date (c) Cancel
  40. 40.🔘 Our rule: buttons are at least 48 px tall. How many of these buttons follow the rule?
    Send button: 60 px tall
    Cancel button: 40 px tall
    Done button: 64 px tall
    Help button: 36 px tall

Answer key

  1. 0
  2. 30
  3. False
  4. ON
  5. 0
  6. that tab’s main screen
  7. 730
  8. line 2
  9. a slider
  10. False
  11. a user need
  12. 3
  13. Ocean
  14. only one
  15. an app
  16. in the cloud
  17. 45
  18. read a question
  19. take the photo
  20. 2
  21. 40
  22. Home
  23. pick one of two actions
  24. expected result
  25. set a due date
  26. is installed on a phone
  27. Welcome!
  28. line 1
  29. 4
  30. dead end
  31. 470
  32. 94
  33. 8
  34. a named block of code
  35. to build what they need
  36. tap to Send
  37. test it again
  38. True
  39. Cancel
  40. 2

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