Chapter 1.2 - Printing Results of Expressions

1.2 - Printing Results of Expressions 

This next program does not have quotes around 2+3, and the computer will evaluate it as a mathematical expression. It will print 5 rather than 2+3.

print(2 + 3)

The code below will generate an error because the computer will try to evaluate “Hello World” as a mathematical expression, and that doesn't work at all:

print(Hello World)

The code above will print out an error SyntaxError: invalid syntax which is computer-speak for not knowing what “Hello” and “World” mean.

Try to print the output of other expressions using the CLI.