A list gives eight bacteria with their shape and their Gram stain. You will count the bacteria of each shape, list the Gram negative ones, and find the share that are rods. Then the program draws the counts.
The idea. A shape is coccus, bacillus, vibrio or spirillum. A Gram positive bacterium takes up the stain; a Gram negative one does not.
Your tasks.
shape_counts to a dictionary of each shape and the number of bacteria with it.negatives to the names of the Gram negative bacteria, in the order of the list.share_rods to the per cent of the bacteria that are bacilli.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…