In this exercise you will use the REPL to declare variables and run statements.
Try your first Python statement
Python supports an interactive console experience, which allows you to type in commands and see the results immediately.
In a console, type
pythonto start the Python interpreter in the interactive mode.
You should see output that looks similar to:
Python 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
>>>is the interpreter waiting for you to type a Python command.
Type the following statement into the interpreter.
It should echo the text directly back to you and then put another prompt waiting for the next command.
Hello World! >>>
Declare and output variables
With the REPL running, let's create variables next.
Type the following code, to declare a variable:
PI = 3.14
Type the name of the variable
PI, to echo out its value:
Your output should show its value: