Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
0 Now let's look at operators. 1
With variables alone 2
we cannot do much. 3
Not even store data, in fact, not because they cannot. 4
But because we need to use an operator to actually assign a value to a variable. 5
Now, let's look at the code here and let's assign two values to two variables and then use the addition 6
operator to add these two values and assign the new value in the third variable. 7
So first we have "a" which is 1 because it is an operator assign, then we have "b" and then we have "c", 8
which is the sum of "a" plus "b". 9
So the order of the execution of this is of course "a" + "b", and then the final result gets assigned 10
to "c". You can print "c", so you can see that the number will be three. 11
in this case. There are other operators that you should know of: addition(+), subtraction(-), multiplication(*) 12
and division(/). 13
All of these operators work exactly like in math, with the observation that the division cannot be 14
divided by zero. 15
It will result in an error. 16
Not all of the operators handle calculations. 17
For example, we have the logical operators: AND(&&) and OR(||) what they do is basically they handle own unique 18
variable type called boolean, which can be either true or false as following. 19
For example, if you use the AND operator, it can also be as this symbol &&. 20
If we have true && true, it will be true. 21
If we have true && false => false, false && false => it will be false. 22
For example, this is good in conditions like is the AI moving to a particular target AND also is the AI 23
having a particular health. 24
Then it's true that otherwise it's false. 25
And the OR operator is a little different, of course, because true || true equals true, but true || false 26
equals true. 27
So the difference is that only one of the conditions needs to be true 28
in order for the whole statement to be true. We can put it to the test and see the result. 29
Of course this is AND so true and false will be equal false and this is how we can actually use them. 30
Let's see, we have a variable called is enemy visible and true? 31
And then in the next section when we will be discussing about flow control, we will see how to get 32
the most out of these operators.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.