Python Programming 1
Getting Started To begin our computer science lesson, we first want to jump right into computer programming. Before understanding the theory behind the language, lets try and write a few programs.
What you will need for these lessons are access to a computer that can download applications like google chrome, sublime text 3, and PyCharm CE. (We are going to download sublime now even though it may be a while until we use it.)
First, go to www.python.org and download python 2.7 for your operating system (Mac or Windows). Go ahead and install the file you just downloaded to have python on your computer. In order to check if you have python installed (which is important to know), open up terminal if you are on a Mac and command prompt if you are on windows. If you are on a Mac, type in "python" into the terminal and hit enter. You should see a paragraph show up listing Python 2.7. If you are on Windows, type in "cd C:\Python27" and hit enter. You should see a paragraph show up listing Python 2.7. Then type in python and you will see what Mac users will see. If that worked, go ahead and exit the application. If it presented an error, see me immediately.
Go to this website to download sublime. Obviously, if you are on windows get the windows version. If you are on a mac get OSX. Sublime is what is known as a text editor. It is similar to a simple application like notepad in that all it does is allow you to edit different types of documents. However it has intelligent systems inside the app that give it the ability to generate code and help you find errors while structuring the program.
It looks just like the image above.
The great thing about sublime which makes it feel like a true interactive development environment (IDE) (like MS visual studio) is that it can run code like python inside the application and provide a console.
Now that you have sublime, we are going to get an application called PyCharm CE. Go to this link to download it. It is a normal easy install. It is about 180 MB.
The app looks like this:

Go ahead and click create new project. Make sure the interpreter on the next screen says 2.7 or something like that (This should be the only option). Now click create.
Your screen should be blank like this:

On the left panel you should see your folder (untitled unless you named it) with an arrow next to it. Right click on the folder and select New-->File. Save the file as something like "tutorial1.py". Name it whatever you want but be sure to have a .py extension to signify to the compiler (PyCharm) that this is a python file. The screen populates a blank sheet and the file is present in the left panel.
Now you can begin programming. Programming with python is very easy. Our first application will simply print "Hello World" to the screen. All you need to do is type in the following code.
print("Hello World")
Thats it!
In other programming languages, like C++, you would need to type in quite a bit more:
include
using namespace std;
int main(){
cout << "Hello World" << endl;
return 0;
}
Python is very high level (easy to understand) and helps you create applications quickly with its out of the box technology.
In order to build this application and see it in action, go to the run tab on the toolbar and click run. You should see a console in PyCharm appear at the bottom of the screen. It says your message and gives you some data on the file and execution code.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Video tutorials Video 1
Now that you've created your first python app, lets see what else you can do!
Make a program that prints out your full name, high school, and your favorite teacher on separate lines.