Title says it all. Given some input, turn it into a boolean value (0 or 1), without using conditional statements (e.x.
== > < <= >= != ~=), or any function which uses conditional statements within its implementation, such as
for. Your program must work with floating points, although you get more if it works with other items.
A general rule for determining whether
bool(item) is False is if the item is empty (
'' is an empty string,
 is an empty list.), or if the function used to turn an item of one type into another is given no input (in Python,
Here are (some of) the different valid types. Your program is considered to work with one type if it works with one item in the following lists:
- Integers, floating points, doubles, longs
- Lists, tuples, arrays (bytearrays)
Program score will be calculated like this:
[# of characters]-(50*[# of types]). The program with the smallest score wins the challenge.
for(;foo;), etc. all do). \$\endgroup\$