193k views
0 votes
Ashley has 100 books that she wants to give away at the rate of n books per week. Write a recursive function that represents the number of books Ashley has at any time. The recursive function that gives the number of books Ashley has at any time is

2 Answers

3 votes
X: represents how many weeks
N: represents books per week
B: represents books she has at anytime

So the recursive formula would be: 100 - XN = B
User David Ferris
by
8.0k points
2 votes

Answer:
100-wn , where w is the number of weeks (natural number) .

Explanation:

Given: Ashley has 100 books that she wants to give away at the rate of n books per week.

Let 'w' be the number of weeks .

Then after first week w=1,

The number of books Ashley has after first week =
100-n

[Since she wants to give away at the rate of n books per week.]

Then after second week w=2,

The number of books Ashley has after second week =
100-n-n=100-2n

Then after third week w=3,

The number of books Ashley has after third week =
100-2n-n=100-3n

Similarly for w weeks, the number of books Ashley has after w weeks =
100-wn

Hence, the recursive function that gives the number of books Ashley has at any time is
100-wn, where w is the number of weeks.

User Jack Lilhammers
by
8.3k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories