Sep-02-2019, 12:46 PM
Not necessarily.
Anyway, I tried using Decimal, other ideas and other than brute force slow I am at some loss. The answer, of course, is a binary expression of all zeros except for a 1 in the 1.717... billionth place.
Since the professor did not specify that it has to be in base 10 you could express this in base 2 and be done, but I think that will get you an F, or maybe a C- for cleverness.
>>> 2**3**2 512 >>> (2**3)**2 64 >>> 2**(3**2) 512 >>>In selected cases it may be the same but not always.
Anyway, I tried using Decimal, other ideas and other than brute force slow I am at some loss. The answer, of course, is a binary expression of all zeros except for a 1 in the 1.717... billionth place.
Since the professor did not specify that it has to be in base 10 you could express this in base 2 and be done, but I think that will get you an F, or maybe a C- for cleverness.