 So I wanted to show you just a real-world application of using a conditional statement as part of something bigger And so this is an example of that. This is Say for example, I had an address and I needed to geolocate that address for whatever purpose So I need the longitude and latitude. Well, let's say for example Williams Hall if we hadn't been Online we would be either in Williams Hall or Daniel's Hall We'd be you know roughly speaking in Raleigh or on campus But the entire point is I want to know the longitude and latitude for Williams Hall Now there are some more of the like high-level advanced things that we need to deal with when we're dealing with Making calls like this for example something known as an API key For anyone who's just copying and pasting whatever they see on this video I've already deleted this because I've had someone do that before and it's expensive when they steal my password But either way, this is just some randomly generated password that Google gave me and said hey, you know if you want to access our APIs our our commands to get that kind of data You can use this and I'm just going to take that and I'm going to plug it into Google's Website and you know, they've got a nice little website for API Where I would pass it in the address and My key now I do need to do some other little fancy things like I need to convert those spaces into Plus signs because web pages don't like spaces But you know we're jumping through this this stuff is more a little too advanced is more just like to show it off But again, I go in I download the contents of that web page I'm gonna do a little sleep just to let it all download And then I'm going to do some parsing on that but specifically where I wanted to really look was this idea of conditions let's say for example, I get a when you make a Download of a web page that web browser or your web browser will give you back some kind of response code and specifically a Website giving you back correct data will give you a 200 status code. This is where that joke of like 404 comes from 404 is the status code for that web page was not found and you know, it turned into its own little mean but specifically what I'm looking at is if I didn't get a 200 in this case, I'm making a print statement. Oh something went wrong. I got a problem Then I am doing some more stuff where I'm you know, just grabbing What the status of that was? Specifically because status is gonna tell me if something has screwed up. Maybe my account is overdrawn or Even though I'm using a free tier someone has made too many queries With my account so status is effectively saying oh, well, you know, let me check all of these statuses that Google may have under its belt so in this case Over query limit. I've made too many queries or I asked for a website a Location that doesn't exist. So never will never land ranch does exist. I don't The under side the dark side of the moon, let's see if that works the dark side of the moon So just to see that as an example, I'm not going to over limit because we're dealing with Something that would charge me money But oh, well, let's check if there are zero results and just to continue jumping down if the status is okay That means I did in fact get it And so I'm just going to extract out the longitude and latitude And then I just have some base case of it doesn't exist again But as you can see I would then print it out. So now that I've had that and I gave it an address effectively Let's run this Huh, okay. Well, the dark side of the moon actually has a location who knew I don't know. Let's just give it some random text There we go. Okay, so a random place just out in the world or again Williams Hall Raleigh, North Carolina and There's the Longitude and latitude of Williams Hall Raleigh, North Carolina by using sort of these different commands But very specifically again working with the conditional statements to make sure I get I'm able to process it