Seven names were typed for a list of crops. You will write a function that checks the rules of binomial nomenclature, list the names that pass, and find the share that pass. Then the program draws the right and the wrong ones.
The idea. A computer cannot see italics, but it can check the rest: exactly two words, a genus with only its first letter capital, and an epithet in small letters.
Your tasks.
correct, return True only when name follows the rules.good to the names that pass, in the order of the list.share to the fraction of the names that pass.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…
With Standard, you also open 4 more problems and 1 Python lab. Everything you have used here stays free, always.