CS 1110: Introduction to Programming
Spring 2017
PyCharm Quickstart
|
What is PyCharm?
- PyCharm is to coding as Word is to writing a paper
- PyCharm is an integrated development environment (IDE) - that means it has lots of tools in it to make coding easier
- PyCharm is built to actually do some prediction as to what you're about to type
Starting up PyCharm
- PyCharm works in projects
- Think about each project being a different major thing
- For example, you might have one project for in-class activities, one for POTDs, etc., but in the end it’s up to you
- When you create a new project, you may have a choice between Pure Python and Educational
- Pure Python is where you go to start a blank project for your coding assignments and in-class work
- Educational is where you go to do some of the built-in tutorials (if you got the Educational edition)
- When you create a new Pure Python project, make sure to put it somewhere you can find easily outside of PyCharm so you can copy the files out to submit for POTDs, etc.
Inside PyCharm
A few main windows to note here:
- Project view (left vertical) - this shows you all your projects and files
- Editor (big middle pane) - this is the blank thing in the middle
- Console (appears at bottom when you run code) - the output from your programs appear here
Your First Program
- When you start a new program, start by making a new python file: File -> New -> Python File
- Give the file a name with all lowercase letters, no spaces
Adding your computingID
To automatically include your name and computingID to a .py file:
- Mac: PyCharm -> Preference -> search for template -> Python Script -> enter a comment
# your-name, your-computingID
- Windows: File -> Setting -> search for template -> Python Script -> enter a comment
# your-name, your-computingID
Thanks to Professors Luther Tychonievich, Craig Dill, Mark Sherriff, and Ahmed Ibrahim for the material
provided for this course.