 So now open up timer underscore o2.py. Here we're going to make some cosmetic improvements. The first thing we're going to do is we're going to use our overwrite trick that we used in our clock so that when we're done printing a line, we don't jump down to a new line but instead return back to the beginning of the line with the carriage return. So we'll add the argument to our print statement. We'll add a comma end equals quote backslash r quote. So the end character at the end of what it prints will be a carriage return which sends the cursor back to the beginning of the line, the position indicator, the place where it's going to print next. This will keep it from starting over again on a new line every time it prints another number. So that's cool. We're done away with our multiple lines for multiple numbers. The next change we're going to make is we're going to make sure it counts down and not up. So range goes from zero up through 14, given that we start with 15. What we want is we wanted to count it from 15 down to 1. So the way to combine those is to take our seconds left, 15, and subtract i second, which starts at zero. So 15 minus zero will be 15, 15 minus 1 will be 14, 15 minus 2. All the way down to 15 minus 14 will be 1. That'll be the last thing that'll be printed, it'll sleep for a second, and then we'll get a ding. So that means whenever a number is printed we know we have that many seconds left. So that's another nice thing to add on there. This is also a good time to introduce another trick for making strings, the F string. So before we just said print i second. We didn't worry about trying to turn it into a string. That's because print behind the scenes takes it in and it sees it and says, oh, I see this is a number. I see it's even an integer. I'm going to take it and turn it into a string that looks like that integer should look. So if it's 15, I'm going to turn it into a string that is a character numeral 1 and a character numeral 5 to represent that number. F strings are a little bit more explicit about it. If you have F quote and then another quote later, everything in the middle there is a F string. Within an F string you can use curly brackets to put things that are not characters that are not part of the string but need to be evaluated first. Like variable names, or in this case like a whole expression. Seconds left minus i second is some arithmetic in there. It has to subtract i second from 15 and get the result and then turn that into a string. So it's a very convenient way to slip variables into the strings that you're making. Here we add on a few spaces at the end. This is helpful because there's a trick. When we go for instance from two digit numbers, 10 to 9 for instance, from a two digit number to a one digit number, it'll print the 10, return to the beginning of the line, then it'll print a 9 which is just one character long but it'll leave the 0 from the 10. It doesn't overwrite the whole line. By adding a few spaces after the number, it'll make sure to overwrite whatever was there previously. And then it'll return back to the beginning of the line. Then the program will go through and sleep for a second between each of these and print ding at the end just like it did before. This is also a good time to call out the code block that's indented on line 5 and 6. Python is quirky in that this indent means something to it. In other computer languages, you can indent or not as you choose the computer doesn't care. Python does care. It enforces this. Anything belonging to the four block needs to be indented four spaces. If it's only indented three spaces or if it's indented five spaces, it'll yell at you. It'll make an error. If it's not indented, it will assume that it comes after the for loop. It's not part of the for loop block. The four space indent matters. When we run this, we can see that it does exactly what we'd hoped it would do. It prints 15 overwrites, 14, 13, 12, 11, going from 10 to 9. It takes that zero off. It overwrites it with a space so we're not left with a spare zero hanging on there. 8, 7, 6, all the way down, one sleep ding. There's no numbers left. We get our little timer alarm. Very nice. A definite improvement over what we had before. Before we go, I'll call out a F string blog post that I find really helpful because it includes a lot of examples. We'll use some other examples later in this course. As you're building your own projects, you may find yourself wondering, how do I include a decimal but only add three decimal points? Or how do I include some different data type? This post will probably have an example relating to that. This is super helpful. There will be a link in the lecture. You can refer back to it anytime you need to.