Question: DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6. A group of monkeys

DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DO SECOND PART ONLY PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DO SECOND

6. A group of monkeys have N bananas in day 1. In the next each day, these monkeys eat half the number of current bananas plus one more banana. When the number of the banana n is odd, its half is counted as the lower bound. For example, when 21, half of n should be 10, and 10+1=11 bananas will be eaten on this day. n = Write a program to compute the number of bananas N in the first day, based on the current day d and current number of bananas n. The input of the program should be the current day d and current number of bananas n, and the output of the program should be the number of bananas N in the first day. We assume that before day d, the number of bananas n in every previous day is even. For example, if in day 3 we have nz 12, then the number of bananas in day 2 should be na (n3 + 1) * 2 26, and the original number of bananas in day 1 should be N = n1 = (n2 + 1) * 2 = 54. (3 marks) = Without the assumption that before day d, the number of bananas n in every previous day is even, how many possible values are there for N? Express your answer with d or n or both, and explain why. (2 mark)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!