Related to : PHP: Dividing/Multiplying/Rounding, not exact number

Add a rounding method to Number.prototype in JavaScript 
Extend Number.prototype. Numbers in Javascript are a data type that is
associated with the builtin object "Number." Add the following
polyfill block:
if (!Number.prototype.round) {
Number.prototype.round = function (decimals) {
if (typeof decimals === 'undefined') {
decimals = 0;
}
return Math.round(
this * Math.pow(10, decimals)
) / Ma

Dividing a list into two lists 
You're using lstrip().
lstrip() will remove leading whitespace.
The string " <=50K" has leading whitespace.
So we might try to compare against a string that has no leading
whitespace:
if row[1].strip() == "<=50K":
Or perhaps:
under_50k = [row[:1] for row in training_list if row[1].strip() ==
"<=50K"]
over_50k = [row[:1] for row in training_list if row[1].strip() ==
">50K"

Algorithms for dividing an array into n parts 
This is a variant of the partition problem (see
http://en.wikipedia.org/wiki/Partition_problem for details). In fact
a solution to this can solve that one (take an array, pad with 0s, and
then solve this problem) so this problem is NP hard.
There is a dynamic programming approach that is pseudopolynomial.
For each i from 0 to the size of the array, you keep track of all
possible combinations o

Multiplying word size inputs x86 
It seems like you have a bug in your first example. The result of the
mul bl instruction will be a wordsized result in the AX register. But
then you add the value at memory address num1 to the AL register.
That's going to mess up your result if the addition results in a carry
(i.e. makes AL roll past 255). Consider, for example, if the [num2]
contains 30. The result of the mul bl instruction, the

Dividing an array into optimum no of equal sum sublists 
Finding a single subset with a given weight is NP hard. If you've some
way to identify all the subsets of a given weight and whose costs are
less than $300 then you need to solve an exact cover problem, which is
NP hard in general. So you can't expect to find any algorithm with
less than exponential complexity in the worst case.
But what I'd try here is this:
let W = total weight of all packages
