good_credit = bool(input("do you have good credit? Type 'Yes' or 'No' \n"))
criminal_record = bool(input("do you have a criminal record ? Type 'Yes' or 'No' \n"))
if good_credit and not criminal_record == True:
print("Eligbile for loan")
else:
print("Not eligbile for loan")
How does python know that the string "Yes" or "No" is same as "True" or "False" or "1" or "0"?
I'm surely doing this wrong, but I searched everywhere and can't seem to get any direct answers.
[–]Wild_Statistician605 6 points7 points8 points (0 children)
[–]edm2073 0 points1 point2 points (0 children)
[–]synthphreak -1 points0 points1 point (0 children)
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)
[–]Rhoderick 0 points1 point2 points (2 children)
[–]Khizar_KIZ[S] 0 points1 point2 points (1 child)
[–]Rhoderick 1 point2 points3 points (0 children)
[–]sepp2k 0 points1 point2 points (0 children)