If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Project: Natural selection

Instructions

Simulate a population

See Instructions: Natural selection.

  1. Choose two variations of a trait that Neeblers might have, like small and big.
  2. Model how each variation might influence a Neebler’s chance of survival, including some randomness.
  3. Model reproduction, where children inherit their parent’s trait variation.
  4. Repeat the survival and reproduction steps until the population dies out or some number of generations have passed.

We’ve started a simulation with the example of small Neeblers. You can choose a different trait to vary and rewrite the program, or you can extend the existing program to include a big Neebler variation.

How do different starting population sizes and survival rates influence which Neebler variation thrives?

Code editor

Code files

Output