Not Not Not True

Published by Joshua Señoron in

Something which is not true is false, but something which is not not true is true! Create a function where given n number of "not", evaluate whether it's True or False.

Examples

not_not_not(1, True) ➞ False
# Not True.

not_not_not(2, False) ➞ False
# Not not False.

not_not_not(6, True) ➞ True
# Not not not not not not True.

Notes

Even though this challenge can be easily solved through the use of an if | else block, you might want to solve it through the use of a Boolean Logic Operator or a Bitwise Operator, taking the opportunity to become acquainted with these methods (check the Resources tab to find specific links).

Watch a quick demo on how Edabit works.