

To exit Python, exit(), and to exit the terminal, just type exit.Ġ1:54 Running Python interactively on macOS. Or you can assign a variable… and later on print the value of that variable out. Or you can do some maths, and Python will evaluate it straightaway. Now in the terminal, you can type python3, rather than just python, and now you can interact with Python.Ġ1:23 Again with the classic print('Hello World!'). To get to the terminal window, right-click on the desktop and pick Open Terminal.

To exit the command prompt, just type exit with no brackets.Ġ1:03 Now, running code interactively on Ubuntu. And later on, you can print the value of those variables out.Ġ0:52 To exit the interpreter, type exit(). So you can type the classic thing such as print('Hello World!'), and you’ll see that gets executed.Ġ0:38 You can try some maths.

To run a command prompt, hold down the Windows key and tap R, and then type cmd for command.Ġ0:21 Here, you can see the Command window, and typing python and then hitting Enter will allow us to interact with Python. 00:00 Let’s take a look at running code interactively.
