 Up until now, we haven't been able to test for conditions. When we ask a person for their age in years, as in this program, if they enter a negative number, we do the calculation anyway, even though it doesn't make any sense. We'd like a way to tell if the input is valid before we do the calculation. And that's why Python has the binary if statement, which has this generic model. If some Boolean expression evaluates to true, we do some statements. Otherwise, the expression worked out to false, and we do other statements. That's a bit abstract. So let's put a binary if into this program. We're going to say if the years is greater than zero, everything's okay, and we'll indent the things that we want to do as the result of the if. We want to calculate the days, and we want to print the result. Otherwise, the years is not greater than zero, so we need to print age must be greater than zero. Let's run the program again. This time, if I say the age in years is 35, it does the calculation, run it again, give it a negative 24, and it gives me the error message that age must be greater than zero. In most cases, you're going to have an else to go with an if. You'll want to do one thing or some other thing. Sometimes, though, you'll want to have an if part only without an else to go with it, and that's called a unary selection, one way, as opposed to this binary selection, which is two-way. Let's add some code to ask for the user's name and print it in the output. Name equals input of what is your name, and here in the output, we'll put another placeholder and add name to the things to be output. Let's clear the shell and run it. So, if your name is Nancy and you're 42 years old, that's Nancy's age. What happens if I press only Enter for the name and then put the age in years? It says, you're about 15,330 days old, comma period, and that's fairly ugly. Let's put in a unary selection to provide a name if the user hasn't given us one. If the name is equal to the empty string, and notice I'm using two equal signs here. Remember, a single equal sign means assignment. A double equal sign is asking a question. Our name and the empty string, the same thing. That's a yes-or-no, true-or-false question. If the answer is true, then we're going to set the name to mystery user. We don't need an else. If the name wasn't the empty string, it's the name they entered and it's the one we want to use. Let's clear the shell and run it. First, with a name like Fred, who's 19, and let's run it again. This time with no name, 19, and it gives us the name mystery user instead of Fred, and the output is a little bit more humorous and at least not as ugly as it was before. Some people like to have an else with their if, no matter what. If you're one of those people and you insist on having an else, Python has a construct for you. I can say otherwise, else, pass. Pass is a special keyword that means do nothing. Line 6 through 9 now tell us if the name is the empty string, I set the name to mystery user. Otherwise, I have a valid name, pass on to the next statement, nothing is needed here. And this also works. If I give a name and an age, it works fine. If I don't give a name and give an age, it works exactly as before. To summarize, there are two types of if statements. One is the if with else where you have two choices you do one thing or the other. If the years is greater than zero, it's valid. If the years is not greater than zero, it's not valid. That's a binary selection. The other kind is a unary selection. If the name is the empty string, we'll set the name. Otherwise, there's nothing to be done and so we don't even need the else part. However, if you're one of the people who insists on having an else for every if, you can always use pass to tell Python do nothing.