You will finish a program that predicts what happens to an aldehyde in dilute and in concentrated sodium hydroxide. It also counts the products of a crossed aldol reaction.
The idea. A compound with an alpha hydrogen does the aldol reaction in dilute base. An aldehyde with no alpha hydrogen does the Cannizzaro reaction in concentrated base. A ketone with no alpha hydrogen does neither.
Your tasks.
reaction(alpha_h, is_aldehyde) so that it returns "aldol" when there is an alpha hydrogen, "cannizzaro" for an aldehyde with none, and "none" otherwise.crossed_products(a, b) so that it returns the number of aldol products of two compounds, where each argument is True when the compound has an alpha hydrogen.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…