Resource Organization u0026 Loading Quiz: Mastering External Files Quiz

  1. Efficient Image Loading

    Which method is commonly used in web development to delay loading images until they enter the viewport, improving performance?

    1. Lazy loading
    2. Crazy loading
    3. Loading on boot
    4. Heavy loading
    5. Lazy loding
  2. Grouping Resources

    In a typical file structure for a game, where should you store all your sound effects for easy access and management?

    1. In a dedicated folder such as 'assets/sounds/'
    2. Directly in the root directory
    3. Mixed with image files in an 'assets/images/' folder
    4. In a random folder each time
    5. On the desktop
  3. Bundling Assets

    Which technique can reduce the number of HTTP requests by combining multiple image files into a single file?

    1. Using a spritesheet
    2. Direct image embedding
    3. Sending images individually
    4. Asset scattering
    5. Sprytesheet
  4. Optimizing Audio Files

    What is a key benefit of using compressed audio formats like OGG or MP3 for background music in applications?

    1. Reduced file size and faster loading
    2. Uncompressed quality retains better fidelity
    3. It increases file size for more clarity
    4. Compression makes sounds louder
    5. MP4 is the only usable format
  5. Loading Scripts Dynamically

    In JavaScript, which HTML attribute allows you to defer loading an external script until after the page has finished parsing?

    1. defer
    2. refre
    3. async
    4. sync
    5. deferr
  6. Organizing Resource Paths

    Why is it considered best practice to use relative paths (like '../images/logo.png') for resource loading in web projects?

    1. They make the project portable between environments
    2. Absolute paths load faster
    3. Relative paths increase security of resources
    4. You can only use them in production
    5. They decrease performance
  7. Caching Strategies

    Which HTTP header can be set to instruct browsers to cache static resources for improved load times?

    1. Cache-Control
    2. Content-Typo
    3. Location
    4. X-Requested-With
    5. Cahce-Control
  8. Efficient Resource Management

    What is the primary advantage of preloading critical images in a web application?

    1. Improved perceived performance by showing visuals faster
    2. Smaller file size
    3. It increases security
    4. Prevents image usage
    5. It disables caching
  9. Naming Resource Files

    Which naming convention helps avoid issues when deploying resources across different operating systems?

    1. Use lowercase letters and avoid spaces
    2. Use spaces and capital letters
    3. Add random symbols
    4. Name files with only numbers
    5. Include file extensions twice
  10. Batch Loading Techniques

    In Python, which package is commonly used in game development to efficiently batch load image resources for a project?

    1. pygame
    2. panda
    3. imloadr
    4. pilow
    5. pygames