
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
A school is holding an English speech contest and plans to purchase $30$ notebooks as prizes. The prices of notebooks $A$ and $B$ are $12$ yuan and $8$ yuan, respectively. Let $x$ represent the number of notebook $A$ purchased.

$(1)$ Express the number of notebook $B$ purchased in terms of $x$ (using an algebraic expression);

$(2)$ Let $y$ represent the total cost of purchasing these two types of notebooks. Find the functional relationship between $y$ and $x$, and determine the maximum and minimum values of $y$.

Present the answer in LaTex format: \boxed{Your answer}
user