You will write the Nernst equation as a function and use it for the two ions of a nerve cell. The concentrations are the model values of the lesson, in mmol/L, at body temperature.
The idea. For one kind of ion, in millivolts, where is the charge of the ion.
Your tasks.
nernst. It gives the potential in millivolts for the concentration outside, the concentration inside and the charge z.e_k and e_na to the potentials of K+ and Na+ for the model values, rounded to one decimal place.closer_to. It gives "K" when a voltage is closer to the potassium potential than to the sodium potential, and "Na" otherwise.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…