Population Trait Counter
Micro:bit & Battery Pack: Develop WITH your Final Project Partner(s)
We can observe populations (of people, of animals, of pine cones, of turtles) and record their different traits. When scientists are observing they often use digital devices to record what they observe in real time.

First identify a population trait of the green turtle (hint look them up). For example: turtles with spots or turtles without spots. We are looking for a trait that one turtle cannot have BOTH (can't have spots and NOT have spots). These are binary conditions: Alive or Dead, True or False, Chicken or Egg. Then create a Population Trait Counter
On Start:
total = 0
//total number of turtles seen
trait1 = 0
//change name to the trait you are counting
//turtles with spots
trait2 = 0
//change name to the trait you are observing
//turtles without spots
display: Turtle Population Trait Counter
The above section of code declares the variables and sets their starting values = 0
Button A = Trait 1
. When button A is clicked the value of trait1
should increase by 1
and then display a check mark (or some other symbol to indicate that the trait has been counted.
TIP: Consider adding a clear screen after a pause so that there is a clear indicator that a trait has been counted.
Button B = Trait 2
- it should work exactly like trait1
TIP: Consider using a different symbol so that the scientist can be sure that the 2nd trait was counted
On Shake
total = trait1 + trait2
//this should equal all the turtles you have seen
Then Use LED Panel to Communicate results of
Total
Trait1
Trait2
A+B Pressed
reset all variables back to 0
Communicate the reset using words or sybmols
Last updated