Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

**PYTHON ONLY** Every week a vampire has to bite a human and turns them into ano

ID: 3743979 • Letter: #

Question

**PYTHON ONLY**

Every week a vampire has to bite a human and turns them into another vampire. Therefore, the number of vampires after each week doubles. ( If we start out with 1 vampire, after a week we have 2 vampires, after another week we have 4 vampires, then 8, etc.

1) Ask the user for how many weeks they want to run the simulation for and then output the vampire population at the end.

How many weeks? :

4

The earth has 16 vampires after 4 weeks.

2) If the number of vampires is greater than the number of humans then stop your loop. The final output will show that there are no humans left and how many weeks it took to wipe us out.

How many weeks? :

200

The human population was destroyed after just *x* weeks.

Explanation / Answer

1) n = int(input('How many weeks? : ')) print('The earth has %d vampires after %d weeks.' % (2**n, n)) 2) population = 7600000000 n = int(input('How many weeks? : ')) weeks = 0 vampires = 1 while vampires