You will write three small functions for arithmetic progressions: the th term, the sum of terms, and the means between two numbers. The checker tests them on many cases.
The idea. , , and means between and step by .
Your tasks.
nth_term(a, d, n).ap_sum(a, d, n). Use / 2 and return the number it gives.means(x, y, m): return the list of the means, in order.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.