You will write the rules of the lac operon as functions, and use them for cells with one or two copies of the operon. A copy is a tuple (i, o, z). The letter i is "+", "-" or "S", the letter o is "+" or "c", and the letter z is "+" or "-".
The idea. A repressor works on every copy of the operator in the cell, but an operator or a gene works only on its own copy.
Your tasks.
repressors. It gives the list of the active repressors in the cell, that is, the letters i of the copies that are "+" or "S".operator_held. It says whether a repressor is on the operator of one copy. The operator must be "+", and there must be a repressor that is "S", or one that is "+" when there is no lactose.makes_enzyme. It says whether the cell makes working beta-galactosidase: some copy has z equal to "+" and an operator that is not held.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…