# PYTHON REQUIRED Bonus (4 points): Why was 6 afraid of 7? Because 7 89! Actually, this...

###### Question:

PYTHON REQUIRED

Bonus (4 points): Why was 6 afraid of 7? Because 7 89! Actually, this is mathematically impossible. "Cannibal numbers" as they're called can only eat numbers that are smaller than them, or the same size. After eating another number, the number that gets eaten disappears, and the number that ate them increases by 1 For example, given the following set of numbers, let's pretend that 9 is the cannibal. 127, 9,3, 8, 11] 9 could start by eating 3 or 8. Let's say it eats 3, then the numbers would be: [27, 10, 8, 11) Then it could eat 8, so the numbers would be: [27, 11, 11] And lastly, it could eat 11 (27, 12] Your task is to write a program that, given a list of numbers and a target number, determines how many numbers in the list can become exactly that number For instance, in our example, two numbers could reach the value of 10. As we saw, 9 took on that value in the example. However, if 8 were the cannibal, it could .Eat 3 to become 9 Eat 9 to become 10 So it could also hold the value of 10 For a target value of 11, the answer would also be 2, because 9 can become 11, and 11 is already 11 Your function may be passed a string of values separated by commas instead of a list--1 out of 4 points will be awarded for handling this case correctly [ ]: Write your answer here. ]: 3, 8, 11], 11) 2 9, [1: cannibal([27, 9, 3, 8, 11, 50) 0 3, [ cannibal ( [27, [ ]: cannibal ( [3, 3, 2, 2, 2, 1, 1, 1], 4) 9 [ ]: cannibal ( "1,2,3,4,5", 5) -4

#### Similar Solved Questions

##### Question 9 1 pts What's a gamete? The genotype of a sperm or egg. A listing...
Question 9 1 pts What's a gamete? The genotype of a sperm or egg. A listing of the alleles inherited from a particular parent (mother or father). O A reproductive cell (sperm or egg). A listing of the alleles present in an offspring (F1 or F2). Question 10 1 pts Gametes are created by mitosis. T...
##### Giving a test to a group of students, the grades and gender are summarized below Male...
Giving a test to a group of students, the grades and gender are summarized below Male Female Total A 19 11 30 B 15 16 31 C 5 13 18 Total 39 40 79 Let Y be the event that the student got a "B" If one student is chosen at random, find P(7). Hint Remember, the notation Y is the 'complement&...
##### Written responce pre calc quadratic equations. Must show work.
the function f(x)= -16t^2 + 1500 models the height,h of a jumper, in feet, t seconds after jumping from 1500 ft. Determine algebraically how long the jumper was infree fall, to the nearest hundreth of a second....
##### C.M. is an 89-year-old female who presents with her daughter to the provider’s office. The daughter...
C.M. is an 89-year-old female who presents with her daughter to the provider’s office. The daughter is concerned because her mother has not been eating well. SUBJECTIVE DATA  PMH: HTN, Hypothyroid  24-hour diet recall reveals approximately 1,100-calorie intake  Lives al...
##### Omework: Homework10-Chapter18 4 of 5(2 complete) Hw Score: 10.71%, 0.54 of 5 pts core: 0 of...
omework: Homework10-Chapter18 4 of 5(2 complete) Hw Score: 10.71%, 0.54 of 5 pts core: 0 of 1 pt 8.5.34-T Suppose a developer of tax preparation software would like to delermine if the median tax reflund last year differs among various regions of a country. A random sample of taxpayer refunds, in do...
##### A population of 250 frogs increases at an annual rate of 22%
A population of 250 frogs increases at an annual rate of 22%.a. Write an exponential function to model the population of frogs.b. Find the population of frogs after 5 years....
##### Electrlyte case studies 1. Patient presents with headache and decreased level of conciousness. Lab results reveal...
Electrlyte case studies 1. Patient presents with headache and decreased level of conciousness. Lab results reveal sodium of 125, potassium of 3.9, chloride 100, magnesium 1.7, calcium 9.4. What is going on with the patient? What are interventions for this patient?...
##### Based on a sample of n = 20, the least-squares method was used to develop the...
Based on a sample of n = 20, the least-squares method was used to develop the following prediction line: Yi = 5 + 3Xi In addition, SYX = 1.0 = 2 a) Construct a 95% confidence interval estimate of the population mean response for X = 2. b) Construct a 95% prediction interval of an individual respon...
##### A petite young woman distributes her 510 N weight equally over the heels of her high-heeled...
A petite young woman distributes her 510 N weight equally over the heels of her high-heeled shoes. Each heel has an area of 0.850 cm2 . What pressure is exerted on the floor by each heel? With the same pressure, how much weight could be supported by two flat-bottomed sandals, each of area 190 cm2 ?...
##### Bed & Bath, a retailing company, has two departments-Hardware and Linens. The company's most recent monthly...
Bed & Bath, a retailing company, has two departments-Hardware and Linens. The company's most recent monthly contribution format income statement follows: Department Hardware Linens Total $4,330,000 3,180,000$ 1,150,000 Sales Variable expenses 987,000 1,396,000 409,000 Contribution margin 2...