Due Tuesday 11-Apr, at 10:00pm
hw10a
hw10a.py
in that folderhw10a.py
to Gradescope.
For this hw, you may submit up to 15 times, but only your last submission counts.While you may submit to Gradescope as often as you like for this assignment, some questions are not autograded, so you will be responsible for testing your code and making sure it meets the problem requirements.
hw10a.py
your name and the name of your collaborators.Like in the previous assignments, we will be grading your code based on whether it follows the 15-112 style guide. We may deduct up to 10 points from your overall grade for style errors. We highly recommend that you try to write clean code with good style all along, rather than fixing your style issues at the end. Good style helps you code faster and with fewer bugs. It is totally worth it. In any case, style grading already started, so please use good style from now on!
lowerBound(L, x)
that returns the largest element of L that is strictly less than x
. You can assume that L is sorted and contains no duplicates.
countInRange(L, a, b)
that returns the number of elements in the open range (a,b), that is, the numbers of elements in L between a and b, both bounds exclusive.