-How can I get the bool function to read the yes or no, basically if the user inputs a yes, then return 1 and no return 0 and link it back to the main, yes is true and no is false.
-to count the users input other than yes and no n times, the output should just return false(possible to use a increment loop for greater than 2 times)?
The problem with your code is that you are trying to input a float (which is a number) rather than a string or character. But other than that, most of your code was correct except for a few things; when you check the value of a string you need to remember to put speech marks around it. In line 13 you aren't allowed to write it like that, you have to write the full thing out again unfortunately as you can see in my code.
I also made it repeat for you until the user enters the word "yes" or "no" and counts the amount of times they fail to do so.