[Thread Prev] [Thread Next]
On 11 Oct 2001, at 14:58, Gary McCallister wrote:
> I think it would also be fun to create a
> catalog of faces that would allow the observer (experimenter) to arrange
> different kinds of marriages and observe the offspring. It would also be
> valuable to a biologist to be able to keep track of the varios offspring
> in some way so we could test the mendelian assortment taking place.
> Anyway, what do you all suggest?
This is a procedure (function) that generates "DNA strings"
to generateDNA :n
if :n = 0 [output []]
output fput (1 + random 2) generateDNA :n - 1
end
show generateDNA 4
2 1 1 1
show generateDNA 4
1 1 1 2
show generateDNA 4
2 2 1 2
show generateDNA 4
2 2 2 1
show generateDNA 4
2 1 2 1
show generateDNA 4
1 1 1 2
It could be used this way:
to breed
make "DNA generateDNA 4
make "traits [shape eye nose mouth]
dolist [gene :DNA] [
run word (first :traits) :gene
make "traits butfirst :traits
]
show :DNA
end
You could then save DNA strings in a list for further processing or analysis,
like this:
make "listOfDNAStrings []
make "listOfDNAStrings fput :DNA :listOfDNAStrings
Daniel
Previous by thread:
Re: Next Lesson
Next by thread:
Instructions in text boxes
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.
|