Setting up
The Terminal
The Terminal, also sometimes called the Command Line or the Command Prompt on Windows, is a text-based interface for operating your computer. We'll be using it a bit throughout the quarter in order to run our programs, so make sure you know how to open the Terminal on your computer. This website explains how to find the Terminal application on your computer, as well as some further details on what you can do with it. You don't need to worry too much about those details just yet, although you're free to peruse them if you'd like. As we go through the quarter, we'll explore the capabilities of the terminal in much greater depth.
Installing Python
PyCharm Community Edition can help you create Python projects and handle them in an advanced environment. Among the features it provides you with, you can find syntax highlighting, project. PyCharm is also available as a snap package. If you’re on Ubuntu 16.04 or later, you can install PyCharm from the command line. Sudo snap install pycharm-professional pycharm-community -classic.
In order to be able to run Python programs on your computer, you need to install a Python Interpreter. An interpreter is a program that is capable of reading a .py
file that you have written, and translating the Python code in that file to instructions that your computer can easily execute. Begin by downloading Python:
- Windows 64-bit installer (If you're using a relatively new Windows computer, download this file)
- Windows 32-bit installer (If you're using an older Windows computer, download this file)
Note: Macs come with a version of Python installed, but this is an older version of Python (specifically, Python 2). CS 106A requires the use of Python 3, so make sure to follow these instructions even if you think you already have Python installed. If you require the use of Python 2 for other work, you can still install Python 3, which exists alongside Python 2 rather than replacing it.
- Open the downloaded Python installer file and follow the default instructions.
- Open up your terminal application.
- Type
python3
and press enter. You should see something that looks like this:
- Open the downloaded file. Before installing, there should be an option that says 'Add Python 3.7 in PATH'. Make sure to check this box. Then, continue installing normally.
- Open up the command prompt.
- Type
py
and press enter. You should see something that looks like this:
Setting up
The Terminal
The Terminal, also sometimes called the Command Line or the Command Prompt on Windows, is a text-based interface for operating your computer. We'll be using it a bit throughout the quarter in order to run our programs, so make sure you know how to open the Terminal on your computer. This website explains how to find the Terminal application on your computer, as well as some further details on what you can do with it. You don't need to worry too much about those details just yet, although you're free to peruse them if you'd like. As we go through the quarter, we'll explore the capabilities of the terminal in much greater depth.
Installing Python
In order to be able to run Python programs on your computer, you need to install a Python Interpreter. An interpreter is a program that is capable of reading a .py
file that you have written, and translating the Python code in that file to instructions that your computer can easily execute. Begin by downloading Python:
- Windows 64-bit installer (If you're using a relatively new Windows computer, download this file)
- Windows 32-bit installer (If you're using an older Windows computer, download this file)
Note: Macs come with a version of Python installed, but this is an older version of Python (specifically, Python 2). CS 106A requires the use of Python 3, so make sure to follow these instructions even if you think you already have Python installed. If you require the use of Python 2 for other work, you can still install Python 3, which exists alongside Python 2 rather than replacing it.
- Open the downloaded Python installer file and follow the default instructions.
- Open up your terminal application.
- Type
python3
and press enter. You should see something that looks like this:
Pycharm Community Edition For Mac 2020
Installing on WindowsPycharm Community Edition For Mac Os
- Open the downloaded file. Before installing, there should be an option that says 'Add Python 3.7 in PATH'. Make sure to check this box. Then, continue installing normally.
- Open up the command prompt.
- Type
py
and press enter. You should see something that looks like this: