This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
I am going to have to assume that elif works the same as it would in other languages. What you want is:-If the boundary value is included in the higher category, start low and use <
If the boundary value is included in the lower category, start high and use > An example of that is weights of parcels.
No need for ≤ or ≥.
I don't know Python, but it looks like the comparison operators return a value that you can compare to another number. For instance, moduleOneTotal >= 50 might return 0 or 1, which you then compare with 65. This will always be true.
posted 2 months ago
You would have the same problem in C, where you probably do get 0/1, or in Forth, where you get 0/−1.