id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs111fall2019 > zombieApocalypse
prev  |  next  |  chance

A zombie can convert two people into zombies everyday. Starting with just one zombie, how long would it take for the entire population of size pop to become zombies? Write a function zombieApocalypse(pop) that returns the answer to this question.


zombieApocalypse(100) → 5
zombieApocalypse(1000) → 7
zombieApocalypse(7000000000) → 21

...Save, Compile, Run (ctrl-enter)

def zombieApocalypse(pop):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy