With the introduction of numbers previously we shall start on strings. "Besides numbers, Python can also manipulate strings, which can be expressed in several ways. They can be enclosed in single quotes (
'...'
) or double quotes
("..."
) with the
same result." (Guido Van Rossum 3.2).Here are some examples from the book that show these strings:
Now here are my takes on these strings using both single and double quotes:
As you can see the strings work to the single and double quotes, however if you see that there is a syntax error and that is because you have to use a backslash ("\"). If you use a forward slash then the syntax will not work and instead put up an error.
Now with learning simple strings and lines shall help us create more advanced programs later on!
My question for this blog is "Would you guys ever wanna learn a computer language?"
I feel bad, but no. I'm so bad at computers at this level, but I am super thankful for people like you who are advancing technology using this knowledge.
ReplyDeleteThank you so much! Getting a head start in computing language in my age will definitely help me out in the future!
Delete