You will finish three small functions that give the result of a test for an amine of a given class. The class is "primary", "secondary" or "tertiary". For nitrous acid, a flag says whether the nitrogen is on a ring.
The idea. The carbylamine test is positive only for primary amines. Hinsberg's test gives a soluble product for a primary amine, an insoluble one for a secondary amine and none for a tertiary amine. Nitrous acid gives nitrogen gas only with a primary amine whose nitrogen is not on a ring.
Your tasks.
carbylamine(kind) so that it returns True for a positive test.hinsberg(kind) so that it returns "soluble", "insoluble" or "none".gives_gas(kind, ring) so that it returns True when nitrous acid gives nitrogen gas.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…