0
When do you use space and quotations?
Hi I'm new here! For print hello world we used single quotation marks and for exponentiation we are leaving spaces. Why is that and when do we use either? Thanks.
4 odpowiedzi
+ 2
Jacob A.
Single quotation used for String value. According to your example Hello World is a string so we will write inside single quotes
str1 = 'Hello World'
Exponentiation (**) is a numeric operation. Space is optional. If you don't want then don't use.
Example:
You can write either 2 ** 2 or you can write 2**2 both will give same output.
+ 2
Can you give an example of what you are talking about?
+ 1
Thanks AJ!
0
Add tag of language that your question refer to, and it would be nice to see some piece of code, or at least symbols that you have problem with