Hi I just started to learn python from scratch and stumbled upon this recently
birth_year = input('Birth Year: ')
age = 2022 - float(birth_year)
print(age)
In the above lines of code used to determine the age of a person if I replace float with bool(just for experimenting) it returns the value 2021 no matter what the inputted birth year is. Can someone please explain why is it doing so?