Further with input A string is a sequence of characters. A character is simply a symbol. For example, the English language has 26 characters. Computers do not deal with characters, they deal with numbers (binary). Even though you may see characters on your screen, internally it is stored and manipulated as a combination of 0s and 1s. This conversion of character to a number is called encoding, and the reverse process is decoding. ASCII and Unicode are some of the popular encodings used. String Operators
Knowing string operator
LET’S TRY ! What you see with the result ? Can you add between 2 variable has data type as String ? How about multiply between 2 variable has data type as string ? Try this code below !
Why ? When I do the multiplication between 2 variable has data type as string its going ERRORR. It’s going error because, we can’t multiply between the variable with data type as string. The multiplication operators can be work if one of data type is Integer or float
Let’s aprrove it ! Now let’s try the teory was said before. Change the value from variable Y from “EINSTEIN” going to 2 What you see ? Can you run the program ?
Yes, it ca n The result will be say : Why the result looks weird ? No, its normal because from the code was we write before, we multiply variable X with value “ALBERT” twice. So the result will be say