So it'll come back in.
This listening is actually an exercise that is going to help us understand variables a little bit better
what you're supposed to do is you're supposed to find as many variable examples as you can find at least
five for each of desirable types that we discussed earlier.
So you can post the video here.
I'm trying to really think your own or you could just you know move along with me.
I would suggest that you the week on the I guess so now let's get this thought that I'm going to jump
back into ex-coach I'm very close this project savefile project my voice command line tool and I'm going
to call this fine example of brothers I don't get a place here.
So let's go to my THAT am I'm going to remove everything in here and then reformat the code the way
that I've been doing it.
And I don't want to have anything in there.
So the first thing is about integers.
So for integers I write in one on say the end one is tree and daddy is for like is discussed earlier
a number of students.
But that's like like an example of a real life situation.
Just try and find examples of things that happen more often in a programming environment something to
say.
Any number of photos that is going to be for for instance this is the number of photos for a user for
instance in our application how many photos dolls or user have.
Then let's find another one.
This other one on what I say it's called length of a of a of text let's call it.
And that's going to be in my case for because my name is Amir am I have four characters.
So that's also something that you know is more more in line with things that we do in programming as
opposed to things that are happening in real life situations or at some point in this course we will
be developing a game and that game will have a grid of different times.
So that would be an integer the grid size and target size in that game.
For instance 6 the number of titles in the game for instance and other integer for the same game could
be a number of play.
That is how many times our player has played so far let's say eighty nine times now this is a good plan
for us to understand the variables a little bit better.
For instance number of photos is not something I can statically write for.
I have to wait for the photos to be downloaded from somewhere and find out how many are there.
Number of play constantly changes.
It goes from zero to 1 to 2.
So on and so forth.
These numbers are not a static riding's and thats why they are called variables.
They contain a value that can change one step at a time.
So with that in mind now that we have seen some examples of integers that go ahead and write some examples
of floats I'm going to say flawed on my first fruit is going to be like we discussed earlier.
This sounds like what I say distance is two point three and then let's have another one which is more
of a programming situation.
Let's see this is a rating value for a user for instance and that is four point seven.
If it was between 0 to 5 and then say this is a longitude for a certain location and longitude for a
certain location and that is going to be one hundred twenty point seventy six and you might be wondering
what is this format.
The way I'm writing my flawed why and why not separating each of them whenever you are declaring valuables
of the same type.
You can just put them all in one line and just put commas between them.
This line means float distance equals two point three float rating equals 4.7 float longitude equals
120 points or six.
So on and so forth.
Another example of flawed values could be something like our current progress.
That is the current progress of let's say downloading an image that is Point 8.
So about 80 percent of it has already been downloaded and another one could be float on.
I'm going to say a score and this is the score that somebody gets for playing a game and I don't know
for Consta value is point 9 5 he has done really really well.
These are some examples of what float values could could be for us this normal one with booleans so
I'm going to say bullion and the first pulley.
When the house is game paused something that we saw earlier on.
For though the game is paused or not and I'm another one I'm going to say it is player here.
And if that is false it means it is not the players.
Rather it is the computers that were the ops there and 2 to play the game.
Let's say we have a different op and are different.
Our users are being read from 8 and backhands and network and with each user there are some photos somebody
saved Paulian user is red which is false.
And then I'm going to have another one say boolean and this one user's photos of red and that one is
true because we have read all the photos for our user.
Now as you can see there are different values that we assign to different variables and some of them
are static values such as the grid size for the game that we decide this game is going to be played
in a grid size of 6 for instance and then the other was that they have to be calculated such as the
distance and this would be a wrong number.
Every time it will be a changing number.
And that's where that terminology comes from.
So by the end of this exercise you should have a little bit of better understanding of how to use variables
and how to name them something I want to mention.
This is the final point in this lesson is let's say integer V.
Use Charmel chasing which is very popular because 0 for instance.
What is common casing the casing is when we name our variables or when we name our methods or classes
or functions primarily most everything.
We stick to this system which is every first letter becomes capitalized so the very first one is a small
word case letter.
Then we have a capital case capital case capital case.
At the beginning of each of them.
So for instance when I said current progress I wrote C U R of with lowercase leaders on progress or
I road user photos or read every first letter of every first of all I capitalize it.
And this is essentially called Camel casing will remove all doubt so you will remember this term camel
casing.
So first leather stays lowercase.
From there on every first letter of every word becomes capitalized.
With that in mind let's move on to our next lesson.