You are a helpful assistant that can solve the given question step by step with the help of the wikipedia search tool and python interpreter tool. Given a question, you need to first think about the reasoning process in the mind and then provide the answer. During thinking, you can invoke the wikipedia search tool to search and python interpreter tool to calculate the math problem for fact information about specific topics if needed. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags respectively, and the search query and result are enclosed within <search> </search> and <result> </result> tags respectively. For example, <think> This is the reasoning process. </think> <search> search query here </search> <result> search result here </result> <think> This is the reasoning process. </think> <python> python code here </python> <result> python interpreter result here </result> <think> This is the reasoning process. </think> <answer> The final answer is \[ oxed{answer here} \] </answer>. In the last part of the answer, the final exact answer is enclosed within oxed{} with latex format.
system
A certain bookstore currently has $7700$ yuan in funds, planning to use all of it to purchase a total of $20$ sets of three types of books, A, B, and C. Among them, type A books cost $500$ yuan per set, type B books cost $400$ yuan per set, and type C books cost $250$ yuan per set. The bookstore sets the selling prices of type A, B, and C books at $550$ yuan per set, $430$ yuan per set, and $310$ yuan per set, respectively. Let $x$ represent the number of type A books purchased by the bookstore and $y$ represent the number of type B books purchased. Answer the following questions:<br/>$(1)$ Find the functional relationship between $y$ and $x$ (do not need to specify the range of the independent variable);<br/>$(2)$ If the bookstore purchases at least one set each of type A and type B books, how many purchasing plans are possible?<br/>$(3)$ Under the conditions of $(1)$ and $(2)$, based on market research, the bookstore decides to adjust the selling prices of the three types of books as follows: the selling price of type A books remains unchanged, the selling price of type B books is increased by $a$ yuan (where $a$ is a positive integer), and the selling price of type C books is decreased by $a$ yuan. After selling all three types of books, the profit obtained is $20$ yuan more than the profit from one of the plans in $(2)$. Write down directly which plan the bookstore followed and the value of $a$.
user
10
rule
A certain bookstore currently has $7700$ yuan in funds, planning to use all of it to purchase a total of $20$ sets of three types of books, A, B, and C. Among them, type A books cost $500$ yuan per set, type B books cost $400$ yuan per set, and type C books cost $250$ yuan per set. The bookstore sets the selling prices of type A, B, and C books at $550$ yuan per set, $430$ yuan per set, and $310$ yuan per set, respectively. Let $x$ represent the number of type A books purchased by the bookstore and $y$ represent the number of type B books purchased. Answer the following questions:<br/>$(1)$ Find the functional relationship between $y$ and $x$ (do not need to specify the range of the independent variable);<br/>$(2)$ If the bookstore purchases at least one set each of type A and type B books, how many purchasing plans are possible?<br/>$(3)$ Under the conditions of $(1)$ and $(2)$, based on market research, the bookstore decides to adjust the selling prices of the three types of books as follows: the selling price of type A books remains unchanged, the selling price of type B books is increased by $a$ yuan (where $a$ is a positive integer), and the selling price of type C books is decreased by $a$ yuan. After selling all three types of books, the profit obtained is $20$ yuan more than the profit from one of the plans in $(2)$. Write down directly which plan the bookstore followed and the value of $a$.
train