Build tools for the two means, and use them to check the AM-GM inequality on many pairs.
The idea. and , with . geometric means between and have ratio . Two numbers with means and are .
Your tasks.
means, return the pair (A, G) for two positive numbers.insert_gms, return a list of the n geometric means between a and b.from_means, return the two numbers, larger first, whose means are A and G.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 11 more problems, 2 Python labs and 1 extra course. Everything you have used here stays free, always.