Let me demonstrate you something.
I'll create the x variable, store 10 in that
x. y variable, store the text ten in that
variable, and then create two new variables.
sum1 equals to x plus x and
sum2 equals to y plus y.
And then print sum1 and sum2.
Save the script, don't forget, and execute it.
This is the output.
So we got 20 out of x plus x, and 1010 out of y plus y.
What is my point here?
My point is that computers are dumb.
In order for them to understand you, you have
to be very clear, very explicit in what you're
going to say through your language, through Python.
In this case, it's not enough to just say
10, you have to declare what that 10 is.
Is it a number or is it text?
That's why in some languages, in most
of the languages we have type declarations.
So in other languages you would say
something like int, which stands for integer.
So you are saying that this is an integer, 10 is
an integer, and this would be like str y without quotes.
So that tells Python that this is actually
a text and should be treated as so.
So when Python, when you apply a
plus operator, Python will concatenate that text.
So it will add 10 after 10
and it will make this concatenated string.
Now, this is not how it works in Python.
In Python, instead of doing these explicit
declarations, we have implicit declaration instead, which
is this one in here.
So when the number is without quote is an integer.
Well, it can also be a float, but let me talk about that in a few seconds.
And if it's with double quotes, it means it's a text.
If it's z equals to 10.1, for
example, that means it's a float.
And if you don't believe me, you can use the
type function like that x, type(y), and type (z).
The type function will print out
the type of each value.
[Author typing]
So it's a class int, a
class str, which stands for strings.
Everything in quotes is a string
and floats, which stands for float.
With strings, you can also use single quotes like that.
Save it and you're going to get the same output.
So if your intention is to process text, you need
to use quotes if your intention is to process numbers,
so to be able to make mathematical calculations with
them, you need to use them without quotes,
like that or like that.
[Outro music]