You will work out the time that a message needs along two paths made of fibres and chemical synapses. The model values are in the lesson: each chemical synapse adds a delay of 0.5 ms.
The idea. In a fibre, time = length ÷ speed. A message that crosses synapses also pays the delay of each one.
Your tasks.
fibre_time. It gives the time in milliseconds for a length in metres and a speed in m/s.total_time. It takes a list of (length, speed) fibres and the number of synapses, and gives the total time in milliseconds.faster to "A" or "B", the path with the smaller total time.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…