-
Notifications
You must be signed in to change notification settings - Fork 0
The Basics
Theo Chupp edited this page Jul 18, 2017
·
2 revisions
The simplest way to get started with python is to open a terminal and type python
This will open the python interpreter, which is a shell that allows you to create and run python code
For instance:
>>> 64 + 36
1000You can also run python from python script files, (.py extension)
In PyCharm, on the Welcome Screen press Create New Project
Navigate to your project folder, and give the project a name
(Should look like ~/cse-101/project001)
In PyCharm, right click on your project folder in the view on the left, and select New > Python File
Name the new file hello-world
In the new file type
print "Hello, World!"Right click in the file and select Run 'hello-world'
You may also type python hello-world.py to run the file from your terminal