You will write three functions that predict what an alcohol does in three tests. The class of the alcohol is 1, 2 or 3 for primary, secondary or tertiary.
The idea. The Lucas reagent is quick with a tertiary alcohol and slow with a primary one. An oxidising agent takes hydrogen from the OH carbon, so a tertiary alcohol, which has none, does not react. Orange dichromate turns green when it oxidises an alcohol.
Your tasks.
lucas(kind) so that it returns "at once" for class 3, "in about 5 minutes" for class 2 and "clear" for class 1.oxidation_product(kind, strong) so that it returns "aldehyde" or "carboxylic acid" for class 1 (acid when strong is True), "ketone" for class 2 and "none" for class 3.turns_green(kind) so that it returns True when the dichromate changes colour.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…