 Hello there, my name is Dr Jean Clapper and I have a problem. Every now and again I like to have some fun with the Wolfram language. And I saw a tweet the other day that said that the other seven planets can fit in between the Earth and the Moon. And I think most of us have some idea of the diameters of all the planets and know that the Moon is just a little bit under 400,000 km from Earth. And I think yeah maybe they should fit in between all of those. Of course that was a tweet that had some information so yes they do fit in. But do they really? So let's use the Wolfram language and explore this exciting little fun question. So what planets fit in the space between the Earth and the Moon? The first function I want to talk about is just the entity function and that allows us to get information on all sorts of data from the Wolfram service. So I'm using the entity function there. The entity that I'm interested in is planet and I'm specifying one of the planets Earth and I'm assigning that to a computer variable Earth. So if we run that we see our entity there, the planet Earth. Now this entity has all sorts of properties. So if we just ask for the properties of this entity of ours and we're going to get a list of a whole bunch of them. There we go, age, we have alternate names, altitude, distance from Earth, that'd be funny, discovery year, etc. Look at all the different information we can get from this entity of ours, all the properties. So let's look at two of the properties. The first one is rotation period. Now what you can do, we can do rotation period and orbital period, there's orbital period. If you hover over one of these it actually tells you the property name. So for orbital period you'll have to type in orbit period. So there's a tiny little tooltip that appears there, it's probably too small for you to see. But there we go, Earth and then rotation period. So if we execute that we see it takes you 23.934472 hours to rotate about its axis. And what about the orbit period? And if we look at that it takes 365.25636 days. So certainly a lot of information about the planets that's right at your fingertips. So what about the diameter of all the planets? So what I'm going to use here is just the Wolfram Alpha and I'm just going to write the normal sentence there, diameter of the planets. And remember if you're using a Wolfram desktop or Mathematica, there you go, Wolfram Alpha query. So you can just start that line of code with two equal symbols and you'll get access to Wolfram Alpha. So let's run that and it's downloaded a lot of information about the diameter of the planets. You'll see median, highest there, for Jupiter of course the smallest diameter that would be for Mercury. Mercury is smaller for instance than Ganymede. So there we go and I like these ratios here and later we might just use the graphics function and the disk function. And I use these ratios just to plot all of these out. So a lot of information there for you to read about the diameters of the planets. A bunch of them there. So let's just save all the planets as a list and I'm going to use the entity list function here as you can see there. And I'm just specifying planet now as before we used entity and then planet and then specified one of the planets. We're going to just get a list of all the planets back but what I want to do is just delete Earth. So I'm going to pass that as a parameter to the delete function and of course Earth as planet number three. So we're just going to delete that and we assign that to the computer variable planets. So now we have Mercury, Venus, Mars, Jupiter, Saturn, Uranus and Neptune which allows us each of these being entities to get at the properties of all of these. So I'm going to use the table function here, pass all the planets and then I'm going to iterate over this variable I. And what I want is the diameter that would be the property and we go from one to seven because we now have seven planets there. And assign that to the computer variable diameters and now we get a value and it's unit. So each of these are quantities with the units and we get this tiny little Mercury's diameter, Venus almost the size of the Earth, Mars quite a bit smaller, Jupiter very big, Saturn very big and then these gas giants at the end Uranus and Neptune. So we can really simply create a little bar chart of all of these. I've given it a plot label and then the chart legend so we can see what the relative diameter of these planets are and you can see little Mercury, Mars there and of course everyone's familiar with this. But then what about this Earth-Moon distance? So once again I'm going to use Wolfram Alpha and we just write Earth-Moon distance and see what information Wolfram Alpha comes up with. So there we go, the Earth-Moon distance and this is quite exciting, we get all sorts of information. First of all we get the current results at the time of recording here. The Earth-Moon distance is relatively small and we can see the periodicity there. At the moment it's only 358,494 kilometers and some beautiful information there and all sorts of other information. What we're interested in though is just the average distance from Earth and we can see it right there. The average distance from Earth 385,000 kilometers and we're going to save that value together with its unit. So we're going to use the quantity function and we're going to assign that to the computer variable Earth-Moon distance. So let's do that and there we have 385,000 kilometers. Now what I'm going to do is I'm going to create another bar chart and we're just going to put that distance right at the end of our bar chart and lo and behold as we would expect that's a much bigger distance than the diameter of the planets. And right at the end I've called EMD Earth-Moon distance. So let's total all these diameters, so the diameters remember are only of these seven planets and of course we can check whether that would fit in there as the total of the diameters less than the Earth-Moon distance and you can see there 380,200 there, so it's just about going to fit in there. So that's true but that's the average distance remember. So right at the moment where we're sitting at the time of this recording we were saying we're sitting at 358,000 kilometers certainly the planets are not going to fit in that distance between the Earth and the Moon. So it's definitely going to fit into the average distance between the two. So let's just show this table of the image of all the planets because I'm still after generating this simple little graphic. So if we asked for one of the properties is the image property of these planets I'm just using the table function to iterate over all seven of them. I get a nice small little picture of each of these seven planets. And there we go. We have Mercury, Venus, Mars, Jupiter, Saturn, Uranus and Neptune. And what I want to do now is just as we saw before when we looked at information about the diameters of the planets from Earth from Alpha I'm just going to look at the maximum which is of course is just Jupiter. And what I want to do now I'm just going to prepend that just because of a little function that I want to create. I'm just going to prepend my list of diameters with the value zero kilometers and you'll see shortly why I do that. So now I have zero kilometers as my first one and then Mercury and Venus and Mars etc. So what I want to do now is just to create for the function that I'm after I'm just going to divide every planet's diameter by Jupiter's diameter. So we'll have a fraction of the largest and Jupiter will then be one. But because that will generate two small little disks for me when I use the graphics function I'm just multiplying each of those by 10 and that's going to give me a nice little size. Now I'm just going to create a little function because I want to plot on the x-axis every little planet or a disk representing every planet with its relative diameter relative to all the other ones in a nice little row along the x-axis. And that means I've got to put the center of each of the disks at a very specific point on the x-axis. So I'm just creating a little function and that's what this function is going to do. It is just going to go to the one that we have at the moment, multiply it by two and add to that the next one. And that's why I want to start at zero because if I want to put the center of the disk for Mercury at the right point on the x-axis I have to make Mercury number two because we're going to start at zero zero times two zero plus then the first one. So that's going to line them all up for me very nicely. And then I'm going to call the graphics function and so I'm going to use a gray disk for Mercury and then an orange disk for Venus and a red disk for Mars etc. And then I'm putting them in these very specific x comma y values. Of course I want them all on the x-axis so all the y's are going to be zero. And the x-position is going to come from my little function that I created there. And then the relative diameter for Mercury that is going to be number two. Remember Mercury will now be in position two because we prepended that with zero. So let's have a look at this little function and there it is very neat. And you can see the relative diameters there and the colors to sort of indicate which planet it is. And yes those seven planets are going to fit right in between the average distance between the Earth and the Moon. So really easy to use the Wolfram language just to play around with that thought. You know what planets fit in between the Earth and the Moon.