[Tutor] Python problem

dn PyTutor at DancesWithMice.info
Mon Feb 22 19:06:04 EST 2021


On 23/02/2021 12.56, Dennis Lee Bieber wrote:
> On Tue, 23 Feb 2021 12:03:48 +1300, dn via Tutor <tutor at python.org>
> declaimed the following:
> 
> 
>> The second is the list *index* (or "pointer") which *must* be an
>> integer. [will assume "list" for convenience = any collection]
>>
> 
> 	My apologies, but I think you went off the rails at this point... As I
> recall the original post, there is no list/index involved. It is all just
> an iterative numeric computation -- compute a candidate split point (in the
> scaled integer range 0..10000 => 0.00%..100.00%), determine if the optimal
> value is above or below that split, determine a new split point within
> 0..Split or Split..10000 (depending upon which side one determined is
> optimal), taking into account some epsilon used to determine if a solution
> has been found.
> 
> 	It is not a binary search of a collection object...
> 
> 	OTOH: the code that was in the original post contains floating point
> division operators, so one has not seen the supposedly failing code.


You're correct.

The algorithm can be used against previously-computed data, ie sitting
in a list or a table; and at other times computing ever more-precise
results 'dynamically' and by 'splitting the difference'.

Sigh! Not seeing the entire assignment-question, nor the actual code...


This is a Python list. What's all this talk about "Rails", Mizz Ruby?
-- 
Regards,
=dn


More information about the Tutor mailing list