Skip to content

FRQ 2023 #1 HW #10

@NoraTheTurtle

Description

@NoraTheTurtle

Popcorn hacks (classwork)

Image Image Image

Part A (homework)

Image

Takeaways + struggles

I learned to scan through a range while keeping track of a condition with a boolean variable and breaking out of a loop when the condition fails. One challenge I had was understanding how to structure the nested loops so that the program checks the entire block of minutes before deciding whether it is valid. Working through it helped me better understand how nested loops and boolean flags work together to test a sequence of conditions.

Part B

Image

Takeaways + struggles

This part of the lesson reinforced the idea of modular programming and method reuse. Smaller helper methods handle specific tasks. The challenge here was understanding how to loop through the range of periods and stop as soon as the earliest valid block is found, since the prompt requires choosing the lowest-numbered period first. Through this part, I learned how methods can work together and how return values from one method can guide decisions in another.


Connection to AP exam

Both parts of the FRQ require the use of loops to search through a range of values and apply conditional logic to determine when a valid result has been found. Part a emphasizes nested iteration by checking consecutive minutes to determine whether a block of time is available, while part b focuses on method reuse and abstraction by calling helper methods like findFreeBlock and reserveBlock. These skills reflect AP exam expectations, where students must write methods that combine loops, conditionals, and helper method calls to solve a problem efficiently and in a modular way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions