I apologize, I am still pretty new at this. This is from an example in step 4/12 under ‘Control Flow’ sectino of Python 3. How is bool_one true and bool_two false? 5! is 120, and with the space in between, Python is clearly not performing the calculation. The math checks out in bool_two, but again i understand it is treating the characters as a string and not integers. Is the issue that ‘1 + 1 !’ has invalid syntax and thus cannot be equal to a variable? or is it perhaps that the ‘+’ requires an impossible calculation and thus cannot be equal to a variable? Thank you for your help and please stay safe out there!
I checked out of curiosity if the exercises (and Python itself, as I checked the outcome of 1 == True) would recognize 1 and 0 as True and False, and they did! Even in step 4, I got away with my_baby_bool_two = 1 and printing its type as <class 'int'> which I suppose shouldn’t be possible if the checker didn’t recognize the digits as bools. So 1 kind of is an int and a bool at the same time?
This raises the question, are there some important caveats to using 1 and 0 this way? Is it bad practice to have Python coerce these digits into bool when needed, as seen when using 1 in a boolean expression?
Immediately when starting executing this exercise I wrote my_baby_bool = True, which is correct, to then understand that I was forced to make it ‘‘wrong’’, set it as a string and write with a small letter to then be told that it is wrong. Rather mechanic and frustrating way to teach but I see the point.